summaryrefslogtreecommitdiff
path: root/ui/app/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index a27cba6..95e4283 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -1,7 +1,6 @@
import bitmask from 'lib/bitmask'
import Account from 'models/account'
import Provider from 'models/provider'
-import EventLogger from 'lib/event_logger'
class Application {
constructor() {
@@ -11,7 +10,8 @@ class Application {
// main entry point for the application
//
initialize() {
- this.ev = new EventLogger()
+ window.addEventListener("error", this.handleError.bind(this))
+ window.addEventListener("unhandledrejection", this.handleError.bind(this))
if (this.debugging()) {
this.show(this.debug_panel)
} else {
@@ -45,6 +45,10 @@ class Application {
this.debug_panel = window.location.hash.replace('#', '')
return this.debug_panel && this.debug_panel != 'main'
}
+
+ handleError(e) {
+ this.show('error', {error: e})
+ }
}
var App = new Application