don't crash the server if one line of a pin log is invalid

pull/1/head
ansuz 6 years ago
parent 0929aa3fd5
commit 11eb566158

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

Loading…
Cancel
Save