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

Side by Side Diff: sdk/lib/io/socket.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | sdk/lib/io/websocket.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart.io; 5 part of dart.io;
6 6
7 7
8 /** 8 /**
9 * [InternetAddressType] is the type an [InternetAddress]. Currently, 9 * [InternetAddressType] is the type an [InternetAddress]. Currently,
10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported. 10 * IP version 4 (IPv4) and IP version 6 (IPv6) are supported.
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 */ 402 */
403 InternetAddress get address; 403 InternetAddress get address;
404 404
405 /** 405 /**
406 * Returns the remote host connected to by this socket. 406 * Returns the remote host connected to by this socket.
407 */ 407 */
408 String get remoteHost; 408 String get remoteHost;
409 } 409 }
410 410
411 411
412 class SocketIOException implements Exception { 412 class SocketException implements IOException {
413 const SocketIOException([String this.message = "", 413 const SocketException([String this.message = "",
414 OSError this.osError = null]); 414 OSError this.osError = null]);
415 String toString() { 415 String toString() {
416 StringBuffer sb = new StringBuffer(); 416 StringBuffer sb = new StringBuffer();
417 sb.write("SocketIOException"); 417 sb.write("SocketException");
418 if (!message.isEmpty) { 418 if (!message.isEmpty) {
419 sb.write(": $message"); 419 sb.write(": $message");
420 if (osError != null) { 420 if (osError != null) {
421 sb.write(" ($osError)"); 421 sb.write(" ($osError)");
422 } 422 }
423 } else if (osError != null) { 423 } else if (osError != null) {
424 sb.write(": $osError"); 424 sb.write(": $osError");
425 } 425 }
426 return sb.toString(); 426 return sb.toString();
427 } 427 }
428 final String message; 428 final String message;
429 final OSError osError; 429 final OSError osError;
430 } 430 }
OLDNEW
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | sdk/lib/io/websocket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698