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

Unified Diff: pkg/scheduled_test/lib/src/schedule_error.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 | « pkg/scheduled_test/lib/src/schedule.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/schedule_error.dart
diff --git a/pkg/scheduled_test/lib/src/schedule_error.dart b/pkg/scheduled_test/lib/src/schedule_error.dart
index 76d6e009be2980c858b329789fa404b4d86408fa..a985e0da03187425f50bcf043e4369a421f90f8a 100644
--- a/pkg/scheduled_test/lib/src/schedule_error.dart
+++ b/pkg/scheduled_test/lib/src/schedule_error.dart
@@ -30,9 +30,7 @@ class ScheduleError extends AsyncError {
/// [AsyncError]s and [ScheduleError]s will be preserved.
factory ScheduleError.from(Schedule schedule, error, {stackTrace,
AsyncError cause}) {
- if (error is ScheduleError) {
- if (schedule == null) schedule = error.schedule;
- }
+ if (error is ScheduleError) return error;
if (error is AsyncError) {
// Overwrite the explicit stack trace, because it probably came from a
« no previous file with comments | « pkg/scheduled_test/lib/src/schedule.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698