| Index: pkg/barback/lib/src/serialize.dart
|
| diff --git a/pkg/barback/lib/src/serialize.dart b/pkg/barback/lib/src/serialize.dart
|
| index fa5adeaba5d2f1fb069004e376ad1aabcf2ca314..f0b356eca3b3657092167eeb86d4f5f5c4eedcf1 100644
|
| --- a/pkg/barback/lib/src/serialize.dart
|
| +++ b/pkg/barback/lib/src/serialize.dart
|
| @@ -88,24 +88,17 @@ class CrossIsolateException implements Exception {
|
| /// property.
|
| final String message;
|
|
|
| - /// The exception's stack trace, or `null` if no stack trace was available.
|
| - final Trace stackTrace;
|
| + /// The exception's stack chain, or `null` if no stack chain was available.
|
| + final Chain stackTrace;
|
|
|
| /// Loads a [CrossIsolateException] from a serialized representation.
|
| ///
|
| /// [error] should be the result of [CrossIsolateException.serialize].
|
| - factory CrossIsolateException.deserialize(Map error) {
|
| - var type = error['type'];
|
| - var message = error['message'];
|
| - var stackTrace = error['stack'] == null ? null :
|
| - new Trace.parse(error['stack']);
|
| - return new CrossIsolateException._(type, message, stackTrace);
|
| - }
|
| -
|
| - /// Loads a [CrossIsolateException] from a serialized representation.
|
| - ///
|
| - /// [error] should be the result of [CrossIsolateException.serialize].
|
| - CrossIsolateException._(this.type, this.message, this.stackTrace);
|
| + CrossIsolateException.deserialize(Map error)
|
| + : type = error['type'],
|
| + message = error['message'],
|
| + stackTrace = error['stack'] == null ? null :
|
| + new Chain.parse(error['stack']);
|
|
|
| /// Serializes [error] to an object that can safely be passed across isolate
|
| /// boundaries.
|
| @@ -114,7 +107,7 @@ class CrossIsolateException implements Exception {
|
| return {
|
| 'type': error.runtimeType.toString(),
|
| 'message': _getErrorMessage(error),
|
| - 'stack': stack == null ? null : stack.toString()
|
| + 'stack': stack == null ? null : new Chain.forTrace(stack).toString()
|
| };
|
| }
|
|
|
|
|