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

Side by Side Diff: runtime/bin/socket.dart

Issue 9720045: Extend dart:io error handling to all socket functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 interface ServerSocket default _ServerSocket { 5 interface ServerSocket default _ServerSocket {
6 /** 6 /**
7 * Constructs a new server socket, binds it to a given address and port, 7 * Constructs a new server socket, binds it to a given address and port,
8 * and listens on it. 8 * and listens on it.
9 */ 9 */
10 ServerSocket(String bindAddress, int port, int backlog); 10 ServerSocket(String bindAddress, int port, int backlog);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 OSError this.osError = null]); 127 OSError this.osError = null]);
128 String toString() { 128 String toString() {
129 StringBuffer sb = new StringBuffer(); 129 StringBuffer sb = new StringBuffer();
130 sb.add("SocketIOException"); 130 sb.add("SocketIOException");
131 if (!message.isEmpty()) { 131 if (!message.isEmpty()) {
132 sb.add(": $message"); 132 sb.add(": $message");
133 if (osError != null) { 133 if (osError != null) {
134 sb.add(" ($osError)"); 134 sb.add(" ($osError)");
135 } 135 }
136 } else if (osError != null) { 136 } else if (osError != null) {
137 sb.add(": osError"); 137 sb.add(": $osError");
138 } 138 }
139 return sb.toString(); 139 return sb.toString();
140 } 140 }
141 final String message; 141 final String message;
142 final OSError osError; 142 final OSError osError;
143 } 143 }
OLDNEW
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698