Open maksis opened 3 weeks ago
I believe that the crash was avoided before https://github.com/yuanchuan/node-watch/commit/e22615667b0382925db2d46866ee76abb9e043b9 since I had the watch
call inside a try..catch block but it no longer helps when process.nextTick
is present
I'm trying to watch a non-existing network name (
\\INVALID\Directory\
) and the application crashes with the following stack trace:I checked that
fs.stat
inis.file
https://github.com/yuanchuan/node-watch/blob/bd85b602be49437dc49db46dfd3fa2548075a3ac/lib/watch.js#L534
throws the following error so the
error
emitter method is never being exposed:I couldn't figure out that why
checkStat
only handles certain error codes safely and crashes the app on others.https://github.com/yuanchuan/node-watch/blob/bd85b602be49437dc49db46dfd3fa2548075a3ac/lib/is.js#L14