From 7a6e2925bdf94cf93c858323587d24e156d8b7ac Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 22 Sep 2017 19:57:00 -0700 Subject: improved error reporting --- ext/fg/js/float.js | 2 +- ext/fg/js/frontend.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/fg/js') diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js index 22374f8b..ff50483d 100644 --- a/ext/fg/js/float.js +++ b/ext/fg/js/float.js @@ -27,7 +27,7 @@ class DisplayFloat extends Display { if (window.yomichan_orphaned) { this.onOrphaned(); } else { - window.alert(`Error: ${error}`); + window.alert(`Error: ${error.toString ? error.toString() : error}`); } } diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index 63cdc25e..3a90b3ad 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -152,7 +152,7 @@ class Frontend { } onError(error) { - window.alert(`Error: ${error}`); + window.alert(`Error: ${error.toString ? error.toString() : error}`); } popupTimerSet(callback) { -- cgit v1.2.3