From f0ee7a06f7115a655e94fe55759154ce19114eea Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 2 Jan 2013 03:18:18 -0700 Subject: [PATCH] Log a better error upon failing to `open` an fd in path watcher I've been struggling with some intermittent failures, so I'm hoping the code returned from `open` might shed some light on the issue. --- native/path_watcher.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/path_watcher.mm b/native/path_watcher.mm index a5119994a..d91f406b9 100644 --- a/native/path_watcher.mm +++ b/native/path_watcher.mm @@ -164,7 +164,7 @@ static NSMutableArray *gPathWatchers; int fd = open([path fileSystemRepresentation], O_EVTONLY, 0); if (fd < 0) { - NSLog(@"WARNING: Could create file descriptor for path '%@'", path); + NSLog(@"WARNING: Could not create file descriptor for path '%@'. Error code %d.", path, fd); return NO; }