Hello,
I'm using jQuery-1.6.2 and stumbled upon the problem that exceptions within AJAX callbacks are silently ignored:
- $.ajax({
url: '/',
success: function() {
throw 'foo';
}
});
Neither $.ajaxError nor window.onerror are called, either. This really baffles me to no end.
Imagine the exception happens somewhere far down a call stack that the success handler started -- your code will fail and you will have no idea where in the call stack something went wrong. It is really tedious to step through with the debugger until you find the broken spot.
So, what can I do to make exceptions in AJAX-callbacks fall through to the toplevel, so I can see them?
Thanks for your help,
Wolfgang