summaryrefslogtreecommitdiff
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-12-26 18:25:58 -0800
committerKali Kaneko (leap communications) <kali@leap.se>2016-12-29 03:10:03 +0100
commit38fc7da2a9cff329c3b4975d9f01c16c10b572e9 (patch)
tree90acbc081a959eafac71c64c8cbb483d5b1d1b3c /ui/app/app.js
parent3461fb49985413bb578af511bf0d13efbc25b5b6 (diff)
[feature] add support for authenticated API to bitmask.js
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 a27cba6c..95e4283f 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