aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-02-01 13:46:44 +0100
committerGitHub <noreply@github.com>2023-02-01 13:46:44 +0100
commit0b9c5037f707a0b8e0dbb11776b690ae7dde7123 (patch)
tree4672b38c1e2c883e4818df7be41640ec077ffabb /src
parent6d1364431b63b0d3bbe1c5fd604131f9db453396 (diff)
downloadjquery-0b9c5037f707a0b8e0dbb11776b690ae7dde7123.tar.gz
jquery-0b9c5037f707a0b8e0dbb11776b690ae7dde7123.zip
Deferred: Respect source maps in jQuery.Deferred.exceptionHook
So far, `jQuery.Deferred.exceptionHook` used to log error message and stack separately. However, that breaks browser applying source maps against the stack trace - most browsers require logging an error instance. This change makes us do exactly that. One drawback of the change is that in IE 11 previously stack was printed directly and now just the error summary; to get to the actual stack trace, three clicks are required. This seems to be a low price to pay for having source maps work in all the other browsers, though. Safari with the new change requires one click to get to the stack trace which sounds manageable. Fixes gh-3179 Closes gh-5192 Ref https://crbug.com/622227
Diffstat (limited to 'src')
-rw-r--r--src/deferred/exceptionHook.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/deferred/exceptionHook.js b/src/deferred/exceptionHook.js
index 2e3c7cc35..0315b2ecb 100644
--- a/src/deferred/exceptionHook.js
+++ b/src/deferred/exceptionHook.js
@@ -10,8 +10,8 @@ jQuery.Deferred.exceptionHook = function( error, stack ) {
if ( error && rerrorNames.test( error.name ) ) {
window.console.warn(
- "jQuery.Deferred exception: " + error.message,
- error.stack,
+ "jQuery.Deferred exception",
+ error,
stack
);
}