Index: pkg/scheduled_test/lib/scheduled_server.dart |
diff --git a/pkg/scheduled_test/lib/scheduled_server.dart b/pkg/scheduled_test/lib/scheduled_server.dart |
index 8c1ad815da2ef4894087c5fcc9b38ad32212e655..743e2b63b2ec679b0d2313a2f891e89537335a39 100644 |
--- a/pkg/scheduled_test/lib/scheduled_server.dart |
+++ b/pkg/scheduled_test/lib/scheduled_server.dart |
@@ -91,8 +91,8 @@ class ScheduledServer { |
void _handleRequest(HttpRequest request) { |
wrapFuture(new Future.sync(() { |
if (_handlers.isEmpty) { |
- throw "'$description' received ${request.method} ${request.uri.path} " |
- "when no more requests were expected."; |
+ fail("'$description' received ${request.method} ${request.uri.path} " |
+ "when no more requests were expected."); |
} |
return _handlers.removeFirst().fn(request); |
}).catchError((e) { |