improved error reporting
This commit is contained in:
parent
8ba8397170
commit
7a6e2925bd
@ -71,7 +71,7 @@ class Backend {
|
||||
return promise.then(result => {
|
||||
callback({result});
|
||||
}).catch(error => {
|
||||
callback({error});
|
||||
callback({error: error.toString ? error.toString() : error});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@ class DisplaySearch extends Display {
|
||||
}
|
||||
|
||||
onError(error) {
|
||||
window.alert(`Error: ${error}`);
|
||||
window.alert(`Error: ${error.toString ? error.toString() : error}`);
|
||||
}
|
||||
|
||||
onSearchClear() {
|
||||
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ class Frontend {
|
||||
}
|
||||
|
||||
onError(error) {
|
||||
window.alert(`Error: ${error}`);
|
||||
window.alert(`Error: ${error.toString ? error.toString() : error}`);
|
||||
}
|
||||
|
||||
popupTimerSet(callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user