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

Unified Diff: pkg/scheduled_test/lib/src/schedule.dart

Issue 12282007: Make sure we wrap all AsyncErrors in ScheduleErrors. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « no previous file | pkg/scheduled_test/lib/src/schedule_error.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/schedule.dart
diff --git a/pkg/scheduled_test/lib/src/schedule.dart b/pkg/scheduled_test/lib/src/schedule.dart
index 58a14871418f67a2c4e3742d34b5cd49a23f1740..2c7423035c46a142822a1b891ca17c28f6ed646d 100644
--- a/pkg/scheduled_test/lib/src/schedule.dart
+++ b/pkg/scheduled_test/lib/src/schedule.dart
@@ -133,13 +133,13 @@ class Schedule {
_state = ScheduleState.RUNNING;
return tasks._run();
}).catchError((e) {
- errors.add(e);
+ errors.add(new ScheduleError.from(this, e));
return onException._run().catchError((innerError) {
// If an error occurs in a task in the onException queue, make sure it's
// registered in the error list and re-throw it. We could also re-throw
// `e`; ultimately, all the errors will be shown to the user if any
// ScheduleError is thrown.
- errors.add(innerError);
+ errors.add(new ScheduleError.from(this, innerError));
throw innerError;
}).then((_) {
// If there are no errors in the onException queue, re-throw the
@@ -150,7 +150,7 @@ class Schedule {
return onComplete._run().catchError((e) {
// If an error occurs in a task in the onComplete queue, make sure it's
// registered in the error list and re-throw it.
- errors.add(e);
+ errors.add(new ScheduleError.from(this, e));
throw e;
});
}).whenComplete(() {
« no previous file with comments | « no previous file | pkg/scheduled_test/lib/src/schedule_error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698