Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(960)

Unified Diff: runtime/bin/socket_patch.dart

Issue 16123036: Clean up dart:io exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/secure_socket.h ('k') | runtime/bin/stdio_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « runtime/bin/secure_socket.h ('k') | runtime/bin/stdio_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698