Chromium Code Reviews| Index: sdk/lib/io/socket.dart |
| diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart |
| index 1f1211a49d24ce05bc1cadd8b4a18226be1380c5..fdf1787a1c70921f77761fa429130a2f2f4dde7c 100644 |
| --- a/sdk/lib/io/socket.dart |
| +++ b/sdk/lib/io/socket.dart |
| @@ -467,8 +467,16 @@ abstract class Socket implements Stream<List<int>>, IOSink { |
| class SocketException implements IOException { |
| - const SocketException([String this.message = "", |
| - OSError this.osError = null]); |
| + final String message; |
| + final OSError osError; |
| + final InternetAddress address; |
| + final int port; |
| + |
| + const SocketException(String this.message, |
| + {OSError this.osError, |
| + InternetAddress this.address, |
| + int this.port}); |
| + |
| String toString() { |
| StringBuffer sb = new StringBuffer(); |
| sb.write("SocketException"); |
| @@ -480,8 +488,12 @@ class SocketException implements IOException { |
| } else if (osError != null) { |
| sb.write(": $osError"); |
| } |
|
Bill Hesse
2013/07/05 12:26:35
Of course, we are now missing ": " if both message
Anders Johnsen
2013/07/05 12:36:01
Nope.
|
| + if (address != null) { |
| + sb.write(", address = ${address.address}"); |
| + } |
| + if (port != null) { |
| + sb.write(", port = $port"); |
| + } |
| return sb.toString(); |
| } |
| - final String message; |
| - final OSError osError; |
| } |