diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2016-05-10 21:50:00 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2016-05-11 20:21:04 -0400 |
commit | 07c11c03cc7f6d182eab9b50e2f3908ee397f70f (patch) | |
tree | 3302898747542481398e99db38db9ce06158ea51 /src | |
parent | b8bd48109c3e4c2204fdcf91a4e87779f2b1a948 (diff) | |
download | jquery-07c11c03cc7f6d182eab9b50e2f3908ee397f70f.tar.gz jquery-07c11c03cc7f6d182eab9b50e2f3908ee397f70f.zip |
Deferred: Give better stack diagnostics on exceptions
Ref gh-2736
The exception stack has the name of the immediately outer function where the
exception occurred, which can be very handy for tracing errors. Since we already
have the exception object we might as well use it.
Diffstat (limited to 'src')
-rw-r--r-- | src/deferred/exceptionHook.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deferred/exceptionHook.js b/src/deferred/exceptionHook.js index 7d4a296f4..6dbdc8520 100644 --- a/src/deferred/exceptionHook.js +++ b/src/deferred/exceptionHook.js @@ -14,7 +14,7 @@ jQuery.Deferred.exceptionHook = function( error, stack ) { // Support: IE 8 - 9 only // Console exists when dev tools are open, which can happen at any time if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, stack ); + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); } }; |