From 11eb5661586f27ec811b13628b7a6f432a263aaf Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 11 Apr 2019 10:41:07 +0200 Subject: [PATCH] don't crash the server if one line of a pin log is invalid --- scripts/pinned.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/pinned.js b/scripts/pinned.js index 47e2421e4..0f52b4482 100644 --- a/scripts/pinned.js +++ b/scripts/pinned.js @@ -29,7 +29,13 @@ const checkPinStatus = (pinFile, fileName) => { l[1].forEach((x) => { delete pins[x]; }); break; } - default: throw new Error(JSON.stringify(l) + ' ' + fileName); + default: + // TODO write to the error log + /* Log.error('CORRUPTED_PIN_LOG', { + line: JSON.stringify(l), + fileName: fileName, + }); */ + console.error(new Error (JSON.stringify(l) + ' ' + fileName)); } }); return Object.keys(pins);