xo: Enable unicorn/catch-error-name.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-04-25 15:03:37 -07:00
committed by Anders Kaseorg
parent b76467529d
commit cfdc08a038
12 changed files with 39 additions and 40 deletions

View File

@@ -46,7 +46,7 @@ function reloadDB(): void {
try {
const file = fs.readFileSync(linuxUpdateJsonPath, 'utf8');
JSON.parse(file);
} catch (err) {
} catch (error) {
if (fs.existsSync(linuxUpdateJsonPath)) {
fs.unlinkSync(linuxUpdateJsonPath);
dialog.showErrorBox(
@@ -54,7 +54,7 @@ function reloadDB(): void {
'We encountered an error while saving the update notifications.'
);
logger.error('Error while JSON parsing updates.json: ');
logger.error(err);
logger.error(error);
}
}
db = new JsonDB(linuxUpdateJsonPath, true, true);