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

Add try/catch to watchEvent #147

Merged
merged 1 commit into from
Oct 9, 2021
Merged

Conversation

chriskinsman
Copy link
Contributor

The watchEvent method is an event handler for fs.watch().

It has no try/catch handler around it. When change() throws due to a ENOENT there is nothing to catch the exception which causes the process to terminate.

Added a try/catch around watchEvent and both log and emit any errors that are raised.

#143

@chriskinsman chriskinsman mentioned this pull request Oct 1, 2021
@chriskinsman
Copy link
Contributor Author

@lucagrulla, Any chance you could check this out and merge it? Fixes issues in our consumption of this package.

Thanks!

@lucagrulla
Copy link
Owner

Hello @chriskinsman
I might have some time over the weekend to review, merge and release.

Thanks,
Luca

@chriskinsman
Copy link
Contributor Author

Thanks! Will leave you alone until 10/11!

@lucagrulla lucagrulla merged commit b5dd02e into lucagrulla:master Oct 9, 2021
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.

None yet

2 participants