From b7b9779b6532ab07166acf970f2714f474ef4820 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 3 Feb 2020 16:19:16 +0000 Subject: [PATCH] electron-main: Provide a better error message if Seshat isn't installed. Port https://github.com/vector-im/riot-web/pull/11691 --- src/electron-main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/electron-main.js b/src/electron-main.js index 6e56b16..6fbd9ed 100644 --- a/src/electron-main.js +++ b/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); + } } // Things we need throughout the file but need to be created