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

Unified Diff: pkg/barback/lib/src/errors.dart

Issue 101523003: Add chain support to barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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
Index: pkg/barback/lib/src/errors.dart
diff --git a/pkg/barback/lib/src/errors.dart b/pkg/barback/lib/src/errors.dart
index bb9af79d416245af60a316ddb9e9fd92a47692ae..d62efeb1f8959a568d21ff6f511f385fef743eee 100644
--- a/pkg/barback/lib/src/errors.dart
+++ b/pkg/barback/lib/src/errors.dart
@@ -4,8 +4,6 @@
library barback.errors;
-import 'dart:async';
-
import 'package:stack_trace/stack_trace.dart';
import 'asset_id.dart';
@@ -115,9 +113,11 @@ class InvalidOutputException implements BarbackException {
abstract class _WrappedException implements BarbackException {
/// The wrapped exception.
final error;
- final StackTrace stackTrace;
+ final Chain stackTrace;
- _WrappedException(this.error, this.stackTrace);
+ _WrappedException(this.error, StackTrace stackTrace)
+ : this.stackTrace = stackTrace == null ? null :
+ new Chain.forTrace(stackTrace);
String get _message;
@@ -127,7 +127,7 @@ abstract class _WrappedException implements BarbackException {
var stack = stackTrace;
if (stack == null && error is Error) stack = error.stackTrace;
if (stack != null) {
- result = "$result\n${new Trace.from(stack).terse}";
+ result = "$result\n${stackTrace.terse}";
}
return result;

Powered by Google App Engine
This is Rietveld 408576698