Chromium Code Reviews| Index: runtime/bin/socket_impl.dart |
| diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart |
| index ef909cac57cbe264b790a355c29c267da0d13352..9cc1a1a5bbfadccc209624b4fa2452693f1beffd 100644 |
| --- a/runtime/bin/socket_impl.dart |
| +++ b/runtime/bin/socket_impl.dart |
| @@ -296,7 +296,11 @@ class _Socket extends _SocketBase implements Socket { |
| if ((offset + bytes) > buffer.length) { |
| throw new IndexOutOfRangeException(offset + bytes); |
| } |
| - return _readList(buffer, offset, bytes); |
| + int result = _readList(buffer, offset, bytes); |
| + if (result < 0) { |
| + throw new SocketIOException("Error: readList failed"); |
|
turnidge
2011/11/16 18:50:18
Yeah, here would be a good place to have that erro
|
| + } |
| + return result; |
| } |
| throw new |
| SocketIOException("Error: readList failed - invalid socket handle"); |