$.ajax complete function is not fired if success / error functions throw errors
Reported by: |
snover |
Owned by: |
|
Priority:
|
undecided
|
Milestone:
|
|
Component:
|
ajax
|
Version:
|
1.4.2
|
Keywords:
|
|
Cc:
|
|
Blocked by:
|
|
Blocking:
|
|
Once an ajax request has completed, if an error is thrown from the success or error functions, the complete function does not fire. I am not sure if this is intended behaviour or not, but it would seem to me that there is no real reason not to ensure complete is dispatched too.
Additionally, in Firefox (tested in 3.5.9 with Firebug 1.4.5 and 3.6.3 with Firebug 1.5.4), these uncaught errors are silently discarded, which makes debugging kinda hard. Chrome and Safari display the errors properly.
Testcase: http://jsfiddle.net/uqucB/1/
Change History (7)
Keywords: |
needsreview added
|
Priority: |
→ undecided
|
Keywords: |
ajaxrewrite added
|
Keywords: |
needsreview ajaxrewrite →
needsreview,ajaxrewrite
|
Keywords: |
needsreview,ajaxrewrite →
needsreview ajaxrewrite
|
Keywords: |
needsreview ajaxrewrite removed
|
Resolution: |
→ invalid
|
Status: |
new →
closed
|
Silently discarding the errors is the painful part here. I wonder if we can catch/rethrow them?