Skip to content

Commit 4a00bd2

Browse files
committed
Server:优化启动时校验远程函数前查数据的异常处理
1 parent bfaec76 commit 4a00bd2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/server/DemoFunction.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ public static void forceUseable() { // throws UnsupportedOperationException {
103103
//Function[]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
104104

105105
JSONObject response = new DemoParser(RequestMethod.GET, true).parseResponse(request);
106+
if (JSONResponse.isSuccess(response) == false) {
107+
Log.e(TAG, "\n\n\n\n\n !!!! 查询远程函数异常 !!!\n" + response.getString(JSONResponse.KEY_MSG) + "\n\n\n\n\n");
108+
return;
109+
}
110+
106111
JSONArray fl = response.getJSONArray("Function[]");
107112
if (fl == null || fl.isEmpty()) {
108113
Log.d(TAG, "没有可用的远程函数");

0 commit comments

Comments
 (0)