Index: lib/src/backend/invoker.dart |
diff --git a/lib/src/backend/invoker.dart b/lib/src/backend/invoker.dart |
index 221c52a06a3667638c1ec85ea2efda388906d061..564dddad30a2951e786f9195461a38f7dfae0b5a 100644 |
--- a/lib/src/backend/invoker.dart |
+++ b/lib/src/backend/invoker.dart |
@@ -144,10 +144,7 @@ class Invoker { |
} |
/// Notifies the invoker of an asynchronous error. |
- /// |
- /// Note that calling this explicitly is rarely necessary, since any |
- /// otherwise-uncaught errors will be forwarded to the invoker anyway. |
- void handleError(error, [StackTrace stackTrace]) { |
+ void _handleError(error, [StackTrace stackTrace]) { |
if (stackTrace == null) stackTrace = new Chain.current(); |
var afterSuccess = liveTest.isComplete && |
@@ -165,7 +162,7 @@ class Invoker { |
// If a test was marked as success but then had an error, that indicates |
// that it was poorly-written and could be flaky. |
if (!afterSuccess) return; |
- handleError( |
+ _handleError( |
"This test failed after it had already completed. Make sure to use " |
"[expectAsync]\n" |
"or the [completes] matcher when testing async code.", |
@@ -187,7 +184,7 @@ class Invoker { |
var timeout = metadata.timeout.apply(new Duration(seconds: 30)); |
var timer = new Timer(timeout, () { |
if (liveTest.isComplete) return; |
- handleError( |
+ _handleError( |
new TimeoutException( |
"Test timed out after ${niceDuration(timeout)}.", timeout)); |
}); |
@@ -207,7 +204,7 @@ class Invoker { |
// Reset the outstanding callback counter to wait for callbacks from |
// the test's `tearDown` to complete. |
return waitForOutstandingCallbacks(() => |
- runZoned(_test._tearDown, onError: handleError)); |
+ runZoned(_test._tearDown, onError: _handleError)); |
}).then((_) { |
timer.cancel(); |
_controller.setState( |
@@ -225,7 +222,7 @@ class Invoker { |
}, |
zoneSpecification: new ZoneSpecification( |
print: (self, parent, zone, line) => _controller.print(line)), |
- onError: handleError); |
+ onError: _handleError); |
}); |
} |
} |