Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1355)

Unified Diff: pkg/scheduled_test/lib/src/scheduled_server/handler.dart

Issue 23591061: Make package:scheduled_test throw ScheduledServerErrors, not strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove type check on exception. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/scheduled_test/lib/scheduled_server.dart ('k') | pkg/scheduled_test/test/scheduled_server_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « pkg/scheduled_test/lib/scheduled_server.dart ('k') | pkg/scheduled_test/test/scheduled_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698