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 and errorHandler should capture errors in v-on handlers #6953

Closed
Toilal opened this issue Oct 29, 2017 · 4 comments
Closed

errorCaptured and errorHandler should capture errors in v-on handlers #6953

Toilal opened this issue Oct 29, 2017 · 4 comments

Comments

@Toilal
Copy link

Toilal commented Oct 29, 2017

Version

2.5.2

Reproduction link

https://codesandbox.io/s/k9rlpoojpr

Steps to reproduce

Click on throw error button in reproduction link

What is expected?

This should display an alert with error object, handled by errorCaptured hook defined in App.vue component.

What is actually happening?

The errorCaptured hook is not invoked


It seems that typings in options.d.ts is not the same as specified in the docs too.

errorCaptured?(): boolean | void;

https://vuejs.org/v2/api/#errorCaptured

@yyx990803
Copy link
Member

We currently only capture errors in the following:

  • render functions
  • watcher callbacks
  • lifecycle hooks
  • component event handlers

DOM event handlers are currently not included and probably should.

@yyx990803 yyx990803 changed the title errorCaptured hook doesn't work errorCaptured and errorHandler should capture errors in v-on handlers Oct 30, 2017
@TheDeveloperTom
Copy link

What’s the status?

@stalniy
Copy link

stalniy commented Sep 12, 2018

Are there any plans to fix this?

@yyx990803
Copy link
Member

Closed via #8395 (will be out 2.6)

f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants