Add unhandledrejection handling
parent
2141a67664
commit
e054b561c0
|
@ -17,3 +17,7 @@ window.onerror = function (msg, url, lineNo, columnNo, error) {
|
|||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
window.onunhandledrejection = function (event) {
|
||||
alert('Unhandled Rejection: ' + event.reason);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@ window.onerror = function (message, source, lineno, colno, error) {
|
|||
}
|
||||
};
|
||||
|
||||
window.onunhandledrejection = function (event) {
|
||||
show_error_message(localize("Internal application error.") + "\nUnhandled Rejection.", event.reason);
|
||||
};
|
||||
|
||||
if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
|
||||
document.write(
|
||||
'<style>body { text-align: center; }</style>' +
|
||||
|
|
Loading…
Reference in New Issue