You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click the watcher button. An error is thrown and caught by both App.vue and the global handler.
Click the method button. An error is thrown but not caught by anything.
What is expected?
The error handler of parents (and the global handler if propagated) should be called for all errors thrown in a child component. I would expect that this would happen no matter where the error is thrown. Of course async/promise code is a reasonable exception as I understand that to be a language limitation.
What is actually happening?
The error is not caught by any handler.
This is similar to #8567. Is there any documentation on exactly which parts of components you can throw errors in and expect them to be caught by the parent(s)?
The text was updated successfully, but these errors were encountered:
Thanks for the quick response. That does answer my question. I hadn't seen that issue.
I would strongly request that that list be added to the documentation. Without it, it's very unreliable to use the error handling functions. The nature of error handling is one has to know what will be coved and what won't.
Since my question is answered you can close this issue. Or leave it open as a request for the docs to be updated and a request to add error handling to DOM events. (I'm not sure what your process is for this.)
(Whoops, thanks for pointing out the typo. Fixed in the CodeSandbox, for what it's worth.)
Version
2.5.16
Reproduction link
https://codesandbox.io/s/kw0qy3r8wo
Steps to reproduce
Click the watcher button. An error is thrown and caught by both App.vue and the global handler.
Click the method button. An error is thrown but not caught by anything.
What is expected?
The error handler of parents (and the global handler if propagated) should be called for all errors thrown in a child component. I would expect that this would happen no matter where the error is thrown. Of course async/promise code is a reasonable exception as I understand that to be a language limitation.
What is actually happening?
The error is not caught by any handler.
This is similar to #8567. Is there any documentation on exactly which parts of components you can throw errors in and expect them to be caught by the parent(s)?
The text was updated successfully, but these errors were encountered: