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

Vue.config.errorHandler cannot catch the error thrown by watcher whose user is true in the option if the callback returns a promise #9625

Closed
xixileng opened this issue Mar 5, 2019 · 0 comments · Fixed by #9484

Comments

@xixileng
Copy link

xixileng commented Mar 5, 2019

Version

2.6.8

Reproduction link

https://jsfiddle.net/fh5kz3r6/

Steps to reproduce

1.return a promise that reject one error in watch;
2.trigger the watcher in the step 1;

What is expected?

Vue.config.errorHandler can catch the error.

What is actually happening?

Vue.config.errorHandler not catch the error.


I think changing the try {/.../} catch (e) {/.../} in the Vue.prototype.$watch and run function of the watcher to invokeWithErrorHandling can solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant