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

Fix can't listener error event on incorrect file/directory #123

Merged
merged 2 commits into from
Feb 25, 2022

Conversation

leijuns
Copy link
Contributor

@leijuns leijuns commented Feb 21, 2022

Fix can't listener error event on incorrect file/directory.

Like this:

const watcher = watch('incorrect-some-file-path', function(evt, name) {
  //do something
});
watcher.on('error', () => {
  //do something
});

expose error:

events.js:353
      throw er; // Unhandled 'error' event

@yuanchuan
Copy link
Owner

yuanchuan commented Feb 23, 2022

Thank you for the patch! Would you fix the test?

@leijuns
Copy link
Contributor Author

leijuns commented Feb 24, 2022

Fix test case, you can approval it.

@yuanchuan yuanchuan merged commit e226156 into yuanchuan:main Feb 25, 2022
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 this pull request may close these issues.

2 participants