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

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

Issue 93143002: Make pkg/stack_trace use stack chains. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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/scheduled_future_matchers.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 264a0aab8e6afa1204ca4dec6bf42b55fcce9d7d..5b273fd6836c4da4ed010906068a66f567922177 100644
--- a/pkg/scheduled_test/lib/src/schedule_error.dart
+++ b/pkg/scheduled_test/lib/src/schedule_error.dart
@@ -4,8 +4,6 @@
library schedule_error;
-import 'dart:async';
-
import 'package:stack_trace/stack_trace.dart';
import 'schedule.dart';
@@ -18,7 +16,7 @@ class ScheduleError {
final error;
/// The stack trace that was attached to the error. Can be `null`.
- final stackTrace;
+ final StackTrace stackTrace;
/// The schedule during which this error occurred.
final Schedule schedule;
@@ -53,16 +51,12 @@ class ScheduleError {
stackTrace = error.stackTrace;
}
- if (stackTrace == null) stackTrace = new Trace.current();
+ if (stackTrace == null) stackTrace = new Chain.current();
return new ScheduleError(schedule, error, stackTrace);
}
- // TODO(floitsch): restore StackTrace type when it has been integrated into
- // the core libraries.
- ScheduleError(Schedule schedule, error, var stackTrace)
- : error = error,
- stackTrace = stackTrace,
- schedule = schedule,
+ ScheduleError(Schedule schedule, this.error, this.stackTrace)
+ : schedule = schedule,
task = schedule.currentTask,
queue = schedule.currentQueue,
pendingCallbacks = schedule.currentQueue == null ? <PendingCallback>[]
@@ -86,7 +80,7 @@ class ScheduleError {
}
if (stackTrace != null) {
- result.write('Stack trace:\n');
+ result.write('Stack chain:\n');
result.write(prefixLines(terseTraceString(stackTrace)));
result.write("\n\n");
}
« no previous file with comments | « pkg/scheduled_test/lib/src/schedule.dart ('k') | pkg/scheduled_test/lib/src/scheduled_future_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698