Update TaskList.java

pull/2/head
pa2ltb7y5 11 months ago
parent 8143368e41
commit 4a2731614c

@ -42,8 +42,8 @@ public class TaskList extends Node {
mChildren = new ArrayList<Task>();
mIndex = 1;
}
// 创建操作的方法返回一个JSONObject对象
public JSONObject getCreateAction(int actionId) {
public JSONObject getCreateAction(int actionId) {// 创建操作的方法返回一个JSONObject对象
JSONObject js = new JSONObject();
try {
@ -68,8 +68,8 @@ public class TaskList extends Node {
} catch (JSONException e) {
Log.e(TAG, e.toString());
e.printStackTrace();
// 如果生成JSONObject失败则抛出ActionFailureException异常
throw new ActionFailureException("fail to generate tasklist-create jsonobject");
throw new ActionFailureException("fail to generate tasklist-create jsonobject");// 如果生成JSONObject失败则抛出ActionFailureException异常
}
return js;
@ -125,8 +125,8 @@ public class TaskList extends Node {
} catch (JSONException e) {// 当出现JSON解析异常时捕获该异常
Log.e(TAG, e.toString());
e.printStackTrace(); // 打印异常的堆栈跟踪信息,有助于开发人员定位问题
// 抛出一个新的ActionFailureException异常并附带错误信息
throw new ActionFailureException("fail to get tasklist content from jsonobject");
throw new ActionFailureException("fail to get tasklist content from jsonobject");// 抛出一个新的ActionFailureException异常并附带错误信息
}
}
}

Loading…
Cancel
Save