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.
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