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 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

@yyx990803 yyx990803 commented Oct 30, 2017

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

@TheDeveloperTom TheDeveloperTom commented Apr 30, 2018

What’s the status?

enkot added a commit to enkot/vue that referenced this issue Jun 30, 2018
Add handling for v-on normal+async errors (vuejs#6953)
@stalniy
Copy link

@stalniy stalniy commented Sep 12, 2018

Are there any plans to fix this?

@yyx990803 yyx990803 added this to Todo in 2.6 via automation Dec 6, 2018
@yyx990803 yyx990803 moved this from Todo to In progress in 2.6 Dec 6, 2018
yyx990803 added a commit that referenced this issue Dec 20, 2018
@yyx990803
Copy link
Member

@yyx990803 yyx990803 commented Dec 20, 2018

Closed via #8395 (will be out 2.6)

@yyx990803 yyx990803 closed this Dec 20, 2018
2.6 automation moved this from In progress to Done Dec 20, 2018
f2009 pushed a commit to f2009/vue that referenced this issue Jan 25, 2019
erdong-fe pushed a commit to erdong-fe/vue that referenced this issue May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2.6
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants