From 6ead268ef09b43c4401da28fb88c516ac2f530c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 19 Dec 2019 12:45:32 +0100 Subject: [PATCH] electron-main: Provide a better error message if Seshat isn't installed. This closes #11637. --- electron_app/src/electron-main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/electron_app/src/electron-main.js b/electron_app/src/electron-main.js index deb20a1a..453f2fe5 100644 --- a/electron_app/src/electron-main.js +++ b/electron_app/src/electron-main.js @@ -47,7 +47,11 @@ let Seshat = null; try { Seshat = require('matrix-seshat'); } catch (e) { - console.warn("seshat unavailable", e); + if (e.code === "MODULE_NOT_FOUND") { + console.log("Seshat isn't installed, event indexing is disabled."); + } else { + console.warn("Seshat unexpected error:", e); + } } if (argv["help"]) {