show alert() if fatal exception happens while initializing base app objects and app.error is not available

This commit is contained in:
Andrew Dolgov 2019-12-14 09:39:44 +03:00
parent e146a1ab37
commit 0d6add5d7f
2 changed files with 8 additions and 2 deletions

View File

@ -155,7 +155,10 @@ require(["dojo/_base/kernel",
App = new _App(); App = new _App();
} catch (e) { } catch (e) {
this.Error.report(e); if (App && App.Error)
App.Error.report(e);
else
alert(e + "\n\n" + e.stack);
} }
}); });
}); });

View File

@ -592,7 +592,10 @@ require(["dojo/_base/kernel",
App = new _App(); App = new _App();
} catch (e) { } catch (e) {
if (App && App.Error)
App.Error.report(e); App.Error.report(e);
else
alert(e + "\n\n" + e.stack);
} }
}); });
}); });