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(() { |