From 0d6add5d7f9475d60330f233a6b62f9bb81d01c0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 14 Dec 2019 09:39:44 +0300 Subject: [PATCH] show alert() if fatal exception happens while initializing base app objects and app.error is not available --- js/prefs.js | 5 ++++- js/tt-rss.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/js/prefs.js b/js/prefs.js index 1b32c65cb..747eb4105 100755 --- a/js/prefs.js +++ b/js/prefs.js @@ -155,7 +155,10 @@ require(["dojo/_base/kernel", App = new _App(); } catch (e) { - this.Error.report(e); + if (App && App.Error) + App.Error.report(e); + else + alert(e + "\n\n" + e.stack); } }); }); diff --git a/js/tt-rss.js b/js/tt-rss.js index 5e044625d..8868fa7a5 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -592,7 +592,10 @@ require(["dojo/_base/kernel", App = new _App(); } catch (e) { - App.Error.report(e); + if (App && App.Error) + App.Error.report(e); + else + alert(e + "\n\n" + e.stack); } }); });