| Index: sdk/lib/_internal/pub/lib/src/dart.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/dart.dart b/sdk/lib/_internal/pub/lib/src/dart.dart
|
| index 530c798c3b4ab9b159a6900534b729ffbdc88f14..9e84360a24a67a59a4be60e1b020754f788c0bce 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/dart.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/dart.dart
|
| @@ -16,6 +16,7 @@ import '../../../compiler/compiler.dart' as compiler;
|
| import '../../../compiler/implementation/filenames.dart'
|
| show appendSlash;
|
|
|
| +import '../../asset/dart/serialize.dart';
|
| import 'io.dart';
|
| import 'sdk.dart' as sdk;
|
| import 'utils.dart';
|
| @@ -170,44 +171,3 @@ void _isolateBuffer(message) {
|
| });
|
| });
|
| }
|
| -
|
| -/// An exception that was originally raised in another isolate.
|
| -///
|
| -/// Exception objects can't cross isolate boundaries in general, so this class
|
| -/// wraps as much information as can be consistently serialized.
|
| -class CrossIsolateException implements Exception {
|
| - /// The name of the type of exception thrown.
|
| - ///
|
| - /// This is the return value of [error.runtimeType.toString()]. Keep in mind
|
| - /// that objects in different libraries may have the same type name.
|
| - final String type;
|
| -
|
| - /// The exception's message, or its [toString] if it didn't expose a `message`
|
| - /// property.
|
| - final String message;
|
| -
|
| - /// 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].
|
| - 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.
|
| - static Map serialize(error, [StackTrace stack]) {
|
| - if (stack == null && error is Error) stack = error.stackTrace;
|
| - return {
|
| - 'type': error.runtimeType.toString(),
|
| - 'message': getErrorMessage(error),
|
| - 'stack': stack == null ? null : new Chain.forTrace(stack).toString()
|
| - };
|
| - }
|
| -
|
| - String toString() => "$message\n$stackTrace";
|
| -}
|
|
|