Index: runtime/bin/socket_patch.dart |
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart |
index d603532e84c93176f182ca76489ac8781fb24877..7d0f5daf2c292d94c485d9b2b440a0b0a3a232b3 100644 |
--- a/runtime/bin/socket_patch.dart |
+++ b/runtime/bin/socket_patch.dart |
@@ -237,7 +237,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 { |
backlog, |
v6Only); |
if (result is OSError) { |
- throw new SocketIOException( |
+ throw new SocketException( |
"Failed to create server socket", result); |
} |
if (port != 0) socket.localPort = port; |
@@ -490,20 +490,20 @@ class _NativeSocket extends NativeFieldWrapperClass1 { |
// error objects. |
static createError(error, String message) { |
if (error is OSError) { |
- return new SocketIOException(message, error); |
+ return new SocketException(message, error); |
} else if (error is List) { |
assert(isErrorResponse(error)); |
switch (error[0]) { |
case _ILLEGAL_ARGUMENT_RESPONSE: |
return new ArgumentError(); |
case _OSERROR_RESPONSE: |
- return new SocketIOException( |
+ return new SocketException( |
message, new OSError(error[2], error[1])); |
default: |
return new Exception("Unknown error"); |
} |
} else { |
- return new SocketIOException(message); |
+ return new SocketException(message); |
} |
} |