shama / gaze

:crystal_ball: A globbing fs.watch wrapper built from the best parts of other fine watch libs.
MIT License
1.16k stars 167 forks source link

Add error handler for FSWatcher #216

Closed rosen-vladimirov closed 8 years ago

rosen-vladimirov commented 8 years ago

In case FSWatcher raises the error, gaze does not handle it and the process crashes. Add on('error') handler and raise gaze's error event in such cases.

Steps to reproduce: 1) Use Windows 2) Add gaze watcher on a directory 3) Add new dir in your watched dir. 4) Removed the new dir. EPERM error is raised.

shama commented 8 years ago

Would you mind adding a test for this case and fixing the style issues and why the CI checks are failing? Thanks!

rosen-vladimirov commented 8 years ago

Hi @shama, Please excuse me for the delay, my email filters had sent the message in a folder that I do not check a lot :smile_cat: I've fixed the quotes issue, but I'm not very familiar with this testing framework and I'm not sure I'll be able to write correct unit test. I'll try, but not sure how long it will take.