Enable custom promise error handling through overriding of global.onerror
This commit is contained in:
committed by
Steve Gravrock
parent
88de272c89
commit
905e3fc3f9
@@ -67,9 +67,9 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
|
||||
if (j$.isError_(event.reason)) {
|
||||
event.reason.jasmineMessage =
|
||||
'Unhandled promise rejection: ' + event.reason;
|
||||
onerror(event.reason);
|
||||
global.onerror(event.reason);
|
||||
} else {
|
||||
onerror('Unhandled promise rejection: ' + event.reason);
|
||||
global.onerror('Unhandled promise rejection: ' + event.reason);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user