Add some additional debugging prints to the mac os watcher. R=rnystrom@google.com Review URL: https://codereview.chromium.org//146693014 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/watcher@32139 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/pkgs/watcher/lib/src/directory_watcher/mac_os.dart b/pkgs/watcher/lib/src/directory_watcher/mac_os.dart index ba0ede4..e3efa2d 100644 --- a/pkgs/watcher/lib/src/directory_watcher/mac_os.dart +++ b/pkgs/watcher/lib/src/directory_watcher/mac_os.dart
@@ -109,7 +109,7 @@ void close() { if (MacOSDirectoryWatcher.logDebugInfo) { - print("[$_id] watcher is closed"); + print("[$_id] watcher is closed\n${new Chain.current().terse}"); } if (_watchSubscription != null) _watchSubscription.cancel(); if (_initialListSubscription != null) _initialListSubscription.cancel(); @@ -468,6 +468,10 @@ /// Emit an error, then close the watcher. void _emitError(error, StackTrace stackTrace) { + if (MacOSDirectoryWatcher.logDebugInfo) { + print("[$_id] emitting error: $error\n" + + "${new Chain.forTrace(stackTrace).terse}"); + } _eventsController.addError(error, stackTrace); close(); }