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

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

Issue 14706002: Always capture stack traces when running pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 8 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') | pkg/scheduled_test/lib/src/task.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_error.dart
diff --git a/pkg/scheduled_test/lib/src/schedule_error.dart b/pkg/scheduled_test/lib/src/schedule_error.dart
index 09bb35095daebf429c384a618e37ca376731395b..910e4f5fcbaa03d76b9e83caa7779b90e4841aa5 100644
--- a/pkg/scheduled_test/lib/src/schedule_error.dart
+++ b/pkg/scheduled_test/lib/src/schedule_error.dart
@@ -33,7 +33,7 @@ class ScheduleError {
/// The descriptions of out-of-band callbacks that were pending when this
/// error occurred.
- final Iterable<String> pendingCallbacks;
+ final Iterable<PendingCallback> pendingCallbacks;
/// The state of the schedule at the time the error was detected.
final ScheduleState _stateWhenDetected;
@@ -54,10 +54,7 @@ class ScheduleError {
stackTrace = attachedTrace;
}
- if (schedule.captureStackTraces && stackTrace == null) {
- stackTrace = new Trace.current();
- }
-
+ if (stackTrace == null) stackTrace = new Trace.current();
return new ScheduleError(schedule, error, stackTrace);
}
@@ -69,7 +66,7 @@ class ScheduleError {
schedule = schedule,
task = schedule.currentTask,
queue = schedule.currentQueue,
- pendingCallbacks = schedule.currentQueue == null ? <String>[]
+ pendingCallbacks = schedule.currentQueue == null ? <PendingCallback>[]
: schedule.currentQueue.pendingCallbacks.toList(),
_stateWhenDetected = schedule.state;
@@ -112,7 +109,7 @@ class ScheduleError {
result.write("\n\n");
result.writeln("Pending out-of-band callbacks:");
for (var callback in pendingCallbacks) {
- result.writeln(prefixLines(callback, firstPrefix: "* "));
+ result.writeln(prefixLines(callback.toString(), firstPrefix: "* "));
}
}
« no previous file with comments | « pkg/scheduled_test/lib/src/schedule.dart ('k') | pkg/scheduled_test/lib/src/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698