From 4a2731614cc2c0dca0901924d9f30a9dd7b814c9 Mon Sep 17 00:00:00 2001 From: pa2ltb7y5 <1721777650@qq.com> Date: Tue, 26 Dec 2023 20:49:04 +0800 Subject: [PATCH] Update TaskList.java --- src/net/micode/notes/gtask/data/TaskList.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/net/micode/notes/gtask/data/TaskList.java b/src/net/micode/notes/gtask/data/TaskList.java index a7d39fc..a559403 100644 --- a/src/net/micode/notes/gtask/data/TaskList.java +++ b/src/net/micode/notes/gtask/data/TaskList.java @@ -42,8 +42,8 @@ public class TaskList extends Node { mChildren = new ArrayList(); 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异常,并附带错误信息 } } }