Clarify argument to spyOnGlobalErrorsAsync's spy
This commit is contained in:
@@ -611,6 +611,12 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
* handling will be restored when the promise returned from the callback is
|
||||
* settled.
|
||||
*
|
||||
* When the JavaScript runtime reports an uncaught error or unhandled rejection,
|
||||
* the spy will be called with a single parameter representing Jasmine's best
|
||||
* effort at describing the error. This parameter may be of any type, because
|
||||
* JavaScript allows anything to be thrown or used as the reason for a
|
||||
* rejected promise, but Error instances and strings are most common.
|
||||
*
|
||||
* Note: The JavaScript runtime may deliver uncaught error events and unhandled
|
||||
* rejection events asynchronously, especially in browsers. If the event
|
||||
* occurs after the promise returned from the callback is settled, it won't
|
||||
@@ -4076,6 +4082,7 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
|
||||
|
||||
function dispatchBrowserError(error, event) {
|
||||
if (overrideHandler) {
|
||||
// See discussion of spyOnGlobalErrorsAsync in base.js
|
||||
overrideHandler(error);
|
||||
return;
|
||||
}
|
||||
@@ -4119,6 +4126,7 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
|
||||
const handler = handlers[handlers.length - 1];
|
||||
|
||||
if (overrideHandler) {
|
||||
// See discussion of spyOnGlobalErrorsAsync in base.js
|
||||
overrideHandler(error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
|
||||
|
||||
function dispatchBrowserError(error, event) {
|
||||
if (overrideHandler) {
|
||||
// See discussion of spyOnGlobalErrorsAsync in base.js
|
||||
overrideHandler(error);
|
||||
return;
|
||||
}
|
||||
@@ -55,6 +56,7 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
|
||||
const handler = handlers[handlers.length - 1];
|
||||
|
||||
if (overrideHandler) {
|
||||
// See discussion of spyOnGlobalErrorsAsync in base.js
|
||||
overrideHandler(error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -435,6 +435,12 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
* handling will be restored when the promise returned from the callback is
|
||||
* settled.
|
||||
*
|
||||
* When the JavaScript runtime reports an uncaught error or unhandled rejection,
|
||||
* the spy will be called with a single parameter representing Jasmine's best
|
||||
* effort at describing the error. This parameter may be of any type, because
|
||||
* JavaScript allows anything to be thrown or used as the reason for a
|
||||
* rejected promise, but Error instances and strings are most common.
|
||||
*
|
||||
* Note: The JavaScript runtime may deliver uncaught error events and unhandled
|
||||
* rejection events asynchronously, especially in browsers. If the event
|
||||
* occurs after the promise returned from the callback is settled, it won't
|
||||
|
||||
Reference in New Issue
Block a user