Skip to content
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

errorCaptured/errorHandler can't catch error from created hook #2268

Closed
sumerokr opened this issue Sep 29, 2020 · 2 comments
Closed

errorCaptured/errorHandler can't catch error from created hook #2268

sumerokr opened this issue Sep 29, 2020 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@sumerokr
Copy link

Version

3.0.0

Reproduction link

https://codesandbox.io/s/errorcaptured-cant-catch-error-from-created-hook-x316j?file=/src/components/HelloWorld.vue

Steps to reproduce

  • throw error from Child component
  • try to catch it via errorCaptured in Parent component
  • try to catch it via global errorHandler

What is expected?

error is catched

What is actually happening?

error can't be catched

@sumerokr
Copy link
Author

reserved for future notes

@LinusBorg LinusBorg added the 🐞 bug Something isn't working label Sep 30, 2020
@LinusBorg
Copy link
Member

beforeCreate and created hooks in VOA are treated a bit differently since they don't have an equivalent in VCA, and that special treatment is missing the error handling:

https://github.com/vuejs/vue-next/blob/5d825f318f1c3467dd530e43b09040d9f8793cce/packages/runtime-core/src/componentOptions.ts#L665

@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants