刘韬 5 years ago
parent
commit
3d91b2f3f3
1 changed files with 10 additions and 3 deletions
  1. 10 3
      DataFusion/src/com/zskk/control/ViewController.java

+ 10 - 3
DataFusion/src/com/zskk/control/ViewController.java

@@ -51,9 +51,16 @@ public class ViewController extends Controller {
 	}		
 	}		
 
 
 	public void executeSql2() {
 	public void executeSql2() {
-		DataService dService = ServiceFactory.getService(DataService.class);
-        JSONArray jsonArray = dService.getExamList(10);	
-        renderText(jsonArray.toJSONString());
+		try {
+			DataService dService = ServiceFactory.getService(DataService.class);
+	        JSONArray jsonArray = dService.getExamList(10);	
+	        renderText(jsonArray.toJSONString());
+		} catch (Exception e) {
+			// TODO: handle exception
+	        renderText(e.toString());
+
+		}
+		
 
 
 	}
 	}
 	private static void trustAllHosts() {
 	private static void trustAllHosts() {