-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callback or errorback exception disappears #82
Comments
curl's promise-like API is really just a simplistic promises implementation and isn't Promises/A compliant, so a failure in the success callback ("ok" function in your snippet) won't trigger the failure callback. Hm... this seems like a useful feature and should be easy to implement. I'll take a closer look. FWIW, I'm not sure it makes much sense to try to do something when an exception happens in the failure callback. :) -- J |
Hmm, I'd have thought any errors occuring in the callback or errorback should be allowed to continue on their way without being handled by curl. Or am I missing something ? |
"continue on their way" to where? It looks like they're declared in the global scope. If so, the only thing that could catch them would be window.onerror (in browsers where it's supported). |
Sorry, yes I'd have global window.onerror handler which would handle them. I'm encountering a scenario where an error occurs but my app isn't aware of it and continues to display a 'loading please wait...' message indefinitely (also see #81). One possible workaround is that I detect that my app hasn't loaded after, say 30 seconds, then display an error. |
I opened a ticket on wire.js (cujojs/wire#32). I'm closing this issue, but feel free to open it if there's more to chat about. :) |
An exception thrown in a callback or errorback seems to get swallowed.
Reproducable in hello-wire.js by amending index.html line 52...
On run, the error 'bar' simply disappears. Likewise error 'bop' disappears when the errorback runs.
The text was updated successfully, but these errors were encountered: