From 9027fa8d507b0dae7f61b35899edf9fadda84147 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Mon, 21 Jun 2021 10:48:12 -0400 Subject: [PATCH] Continue startup if tasks.json is corrupted --- libs/TaskManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/TaskManager.js b/libs/TaskManager.js index c0976df..81b90ee 100644 --- a/libs/TaskManager.js +++ b/libs/TaskManager.js @@ -158,7 +158,8 @@ class TaskManager{ try{ tasks = JSON.parse(data.toString()); }catch(e){ - done(new Error(`Could not load task list. It looks like the ${TASKS_DUMP_FILE} is corrupted (${e.message}). Please manually delete the file and try again.`)); + logger.warn(`Could not load task list. It looks like the ${TASKS_DUMP_FILE} is corrupted (${e.message}).`); + if (done !== undefined) done(); return; }