From a24fbf8cebdbd53ec9f7ca3f9f6fdff3d81782b7 Mon Sep 17 00:00:00 2001 From: Mickael Kerjean Date: Wed, 1 Jul 2020 10:55:42 +1000 Subject: [PATCH] improve (error): report error on boot --- client/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/index.js b/client/index.js index 4bd6d966..98da25c8 100644 --- a/client/index.js +++ b/client/index.js @@ -47,15 +47,20 @@ window.addEventListener("DOMContentLoaded", () => { } return removeLoader().then(render); }).catch((e) => { - const msg = "Couldn't boot Filestash"; + const msg = "CAN'T LOAD FILESTASH"; Log.report(msg, location.href); - return removeLoaderWithAnimation() + return removeLoaderWithAnimation().then(() => { + $error(msg); + }); }); }); window.onerror = function (msg, url, lineNo, colNo, error) { - Log.report(msg, url, lineNo, colNo, error) + Log.report(msg, url, lineNo, colNo, error); + $error(msg); +} +function $error(msg){ let $code = document.createElement("code"); $code.style.textAlign = "center"; $code.style.display = "block";