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

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

Issue 307543006: Add a "message" field to wrapped barback exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/barback/CHANGELOG.md ('k') | pkg/barback/lib/src/serialize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/errors.dart
diff --git a/pkg/barback/lib/src/errors.dart b/pkg/barback/lib/src/errors.dart
index 0c2b5c5dd5e3eb33eceb424152b6665406607350..3488e31459528b3c9ac40c140715eb7b552774a4 100644
--- a/pkg/barback/lib/src/errors.dart
+++ b/pkg/barback/lib/src/errors.dart
@@ -115,14 +115,16 @@ abstract class _WrappedException implements BarbackException {
final error;
final Chain stackTrace;
+ String get message => "$_message: ${getErrorMessage(error)}";
+
+ String get _message;
+
_WrappedException(error, StackTrace stackTrace)
: this.error = error,
this.stackTrace = _getChain(error, stackTrace);
- String get _message;
-
String toString() {
- var result = "$_message: $error";
+ var result = message;
if (stackTrace != null) result = "$result\n${stackTrace.terse}";
return result;
}
« no previous file with comments | « pkg/barback/CHANGELOG.md ('k') | pkg/barback/lib/src/serialize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698