| Index: runtime/bin/socket_impl.dart
|
| diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
|
| index b262cee9d14e1df00f875efca48f051d0ebc9275..9a9e571b25e6e8cda3a8cb38f971f7a53a45a272 100644
|
| --- a/runtime/bin/socket_impl.dart
|
| +++ b/runtime/bin/socket_impl.dart
|
| @@ -369,13 +369,13 @@ class _Socket extends _SocketBase implements Socket {
|
| return 0;
|
| }
|
| if (offset < 0) {
|
| - throw new IndexOutOfRangeException(offset);
|
| + throw new RangeError(offset);
|
| }
|
| if (bytes < 0) {
|
| - throw new IndexOutOfRangeException(bytes);
|
| + throw new RangeError(bytes);
|
| }
|
| if ((offset + bytes) > buffer.length) {
|
| - throw new IndexOutOfRangeException(offset + bytes);
|
| + throw new RangeError(offset + bytes);
|
| }
|
| var result = _readList(buffer, offset, bytes);
|
| if (result is OSError) {
|
| @@ -400,13 +400,13 @@ class _Socket extends _SocketBase implements Socket {
|
| return 0;
|
| }
|
| if (offset < 0) {
|
| - throw new IndexOutOfRangeException(offset);
|
| + throw new RangeError(offset);
|
| }
|
| if (bytes < 0) {
|
| - throw new IndexOutOfRangeException(bytes);
|
| + throw new RangeError(bytes);
|
| }
|
| if ((offset + bytes) > buffer.length) {
|
| - throw new IndexOutOfRangeException(offset + bytes);
|
| + throw new RangeError(offset + bytes);
|
| }
|
| _BufferAndOffset bufferAndOffset =
|
| _ensureFastAndSerializableBuffer(buffer, offset, bytes);
|
|
|