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

Unified Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 49293003: Report wrapped pub exceptions with --verbose and --trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review change Created 7 years, 1 month 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 | « sdk/lib/_internal/pub/lib/src/source/hosted.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index 0ed773c5dc546d48cc5695fa28ce74a093184e8f..7e5d92f03bbd0ef2409cbb8d8937e5ec5fb32a4d 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -712,14 +712,21 @@ String getErrorMessage(error) {
class ApplicationException implements Exception {
final String message;
- ApplicationException(this.message);
+ /// The underlying exception that [this] is wrapping, if any.
+ final innerError;
+
+ /// The stack trace for [innerError] if it exists.
+ final Trace innerTrace;
+
+ ApplicationException(this.message, [this.innerError, StackTrace innerTrace])
+ : innerTrace = innerTrace == null ? null : new Trace.from(innerTrace);
String toString() => message;
}
/// Throw a [ApplicationException] with [message].
-void fail(String message) {
- throw new ApplicationException(message);
+void fail(String message, [innerError, StackTrace innerTrace]) {
+ throw new ApplicationException(message, innerError, innerTrace);
}
/// All the names of user-facing exceptions.
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/source/hosted.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698