]> source.dussan.org Git - jquery.git/commit
Deferred: Rename `getStackHook` to `getErrorHook`
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 14 Mar 2023 21:32:45 +0000 (22:32 +0100)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 21:32:45 +0000 (22:32 +0100)
commit258ca1ec6a373f85f7849308c967b7e6a993e6e7
tree085396fc342655770c8578781fe230f05ac69727
parentf088c36631df3d5dc98408debd147ea5d3618557
Deferred: Rename `getStackHook` to `getErrorHook`

Rename `jQuery.Deferred.getStackHook` to `jQuery.Deferred.getErrorHook`
to indicate passing an error instance is usually a better choice - it
works with source maps while a raw stack generally does not.

In jQuery `3.7.0`, we'll keep both names, marking the old one as
deprecated. In jQuery `4.0.0` we'll just keep the new one. This
change implements the `4.0.0` version; PR gh-5212 implements
the `3.7.0` one.

Fixes gh-5201
Closes gh-5211
Ref gh-5212
src/deferred.js
src/deferred/exceptionHook.js
test/unit/deferred.js