| Index: sdk/lib/io/secure_socket.dart
|
| diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
|
| index c5fe3c2290befce7aa4df18329b5179193a77414..88f51c58b49bcb9b22da7914f47227f27743402f 100644
|
| --- a/sdk/lib/io/secure_socket.dart
|
| +++ b/sdk/lib/io/secure_socket.dart
|
| @@ -288,7 +288,7 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
|
| }
|
|
|
| StreamSubscription listen(void onData(RawSocketEvent data),
|
| - {void onError(AsyncError error),
|
| + {void onError(error),
|
| void onDone(),
|
| bool unsubscribeOnError}) {
|
| if (_writeEventsEnabled) {
|
| @@ -464,8 +464,7 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
|
| // up handlers to flush the pipeline when possible.
|
| int write(List<int> data, [int offset, int bytes]) {
|
| if (_closedWrite) {
|
| - _controller.addError(new AsyncError(new SocketIOException(
|
| - "Writing to a closed socket")));
|
| + _controller.addError(new SocketIOException("Writing to a closed socket"));
|
| return 0;
|
| }
|
| if (_status != CONNECTED) return 0;
|
| @@ -567,12 +566,9 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
|
| _reportError(e, 'Error on underlying RawSocket');
|
| }
|
|
|
| - void _reportError(error, String message) {
|
| + void _reportError(e, String message) {
|
| // TODO(whesse): Call _reportError from all internal functions that throw.
|
| - var e;
|
| - if (error is AsyncError) {
|
| - e = error;
|
| - } else if (error is SocketIOException) {
|
| + if (e is SocketIOException) {
|
| e = new SocketIOException('$message (${error.message})', error.osError);
|
| } else if (error is OSError) {
|
| e = new SocketIOException(message, error);
|
|
|