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 7f1856b66c1987bfbe1494bb8cf10df8fe61e328..a1f8a969b0faa0946325acb5131c4a7b7f8dff46 100644 |
--- a/pkg/scheduled_test/lib/src/schedule_error.dart |
+++ b/pkg/scheduled_test/lib/src/schedule_error.dart |
@@ -48,6 +48,14 @@ class ScheduleError extends AsyncError { |
error = error.error; |
} |
+ if (stackTrace == null) { |
+ try { |
+ throw ''; |
+ } catch (_, thrownStackTrace) { |
+ stackTrace = thrownStackTrace; |
+ } |
+ } |
+ |
return new ScheduleError(schedule, error, stackTrace, cause); |
} |