Permalink
3 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc4a999
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... you probably shouldn't here. We're supposed to give the exception object to the error callbacks. What are we trying to handle here exactly ?
cc4a999
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good, daddy is here! :)
IE won't give the user any useful error information if a plain string is thrown, so we changed
jQuery.error
tothrow new Error(msg)
instead. Since ajax uses it to throw in the transports I needed to find the places it was expecting strings. Thoughts?cc4a999
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's not actually expecting a string here, because it's catching around the use of converters (where native exceptions can be thrown depending on how such or such converter is implemented). The third parameter of the error callbacks (which is the sole use of the error variable here) is supposed to be the original exception whenever available. In fact same goes for transports actually.