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

Error handling in async watcher #10076

Closed
rightaway opened this issue May 28, 2019 · 1 comment
Closed

Error handling in async watcher #10076

rightaway opened this issue May 28, 2019 · 1 comment

Comments

@rightaway
Copy link

Version

2.6.10

Reproduction link

https://jsfiddle.net/anrzf5uh/

Steps to reproduce

Enter 'obj' in the text input and nothing gets printed to console. Enter str in the text input and uncaught exception: message gets printed to console. But it's wrong in both cases.

If you remove async from the watch method and the call to the await method, then it works properly.

Enter 'obj' in the text input and Object { error: "message" } gets printed to console. Enter str in the text input and message gets printed to console. It's right in both cases.

What is expected?

Error handling should work the same in an async watcher as in a sync watcher.

What is actually happening?

Error handling works correctly in a sync watcher but not async watcher.

@posva
Copy link
Member

posva commented May 28, 2019

Duplicate of #10009

@posva posva marked this as a duplicate of #10009 May 28, 2019
@posva posva closed this as completed May 28, 2019
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

No branches or pull requests

2 participants