Index: pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
diff --git a/pkg/scheduled_test/lib/src/scheduled_server/handler.dart b/pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
index 8f61be17b0ea898e3e2053973f1b04e1f67e98f4..316d53611a6be91549f7241537a59c06f1d64645 100644 |
--- a/pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
+++ b/pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
@@ -45,8 +45,8 @@ class Handler { |
_fn = (request) { |
return _waitForTask().then((_) { |
if (!ready) { |
- throw "'${server.description}' received $method $path earlier than " |
- "expected."; |
+ fail("'${server.description}' received " |
+ "$method $path earlier than expected."); |
} |
// Use a nested call to [schedule] to help the user tell the difference |
@@ -55,8 +55,8 @@ class Handler { |
chainToCompleter(schedule(() { |
return new Future.sync(() { |
if (request.method != method || request.uri.path != path) { |
- throw "'${server.description}' expected $method $path, " |
- "but got ${request.method} ${request.uri.path}."; |
+ fail("'${server.description}' expected $method $path, " |
+ "but got ${request.method} ${request.uri.path}."); |
} |
return fn(request); |