Continue startup if tasks.json is corrupted

pull/160/head
Piero Toffanin 2021-06-21 10:48:12 -04:00
rodzic 8eb7ae903b
commit 9027fa8d50
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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;
}