-
Notifications
You must be signed in to change notification settings - Fork 164
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
Questions: Shouldn't an error thrown in .catch bubble up? #216
Comments
Chrome does not throw that error. It logs it to the developer console, but does not throw it. Since this isn't a spec bug, it might be better in the future to ask questions like this on Stack Overflow. |
Is that error uncatchable per spec you mean? |
There's no error at all. It's just like when you use sync XHR and it logs a warning. It's just a developer feature; it doesn't impact the semantics. |
So if you throw in My assumpsion was based on the fact that most of async methods bubble up their unhanded errors. For example window.onerror = function(err){ console.log('err ' + err) } then setTimeout(function() { throw new Error('hi')}) // prints "err Uncaught Error: hi" |
You may be looking for whatwg/html#224 which is in progress. |
@mohsen1 you can catch it either by chaining another |
Thanks for the links. Where can I read about why this way of handling the error is chosen over simply throwing the error in global context? With |
I see inconstancy in various implementation for this code snippet:
Chrome throws that "hoo boy!" error but it doesn't throw anywhere else (Node 4, Safari and Firefox)
The text was updated successfully, but these errors were encountered: