| 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.
|
|
|