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