|
@@ -51,9 +51,16 @@ public class ViewController extends Controller {
|
|
|
}
|
|
|
|
|
|
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() {
|