| Index: lib/io/file_impl.dart
|
| diff --git a/lib/io/file_impl.dart b/lib/io/file_impl.dart
|
| index 95cfc66d5a7e77b9521c3424ea8f23d2bd874b5a..05126a8bbf09f38f7a94fb3a0db3d2f737605cf5 100644
|
| --- a/lib/io/file_impl.dart
|
| +++ b/lib/io/file_impl.dart
|
| @@ -198,7 +198,7 @@ class _FileOutputStream extends _BaseOutputStream implements OutputStream {
|
| // A copy is required by the interface.
|
| var length = buffer.length - offset;
|
| if (len != null) {
|
| - if (len > length) throw new IndexOutOfRangeException(len);
|
| + if (len > length) throw new RangeError.value(len);
|
| length = len;
|
| }
|
| var copy = new Uint8List(length);
|
| @@ -772,10 +772,10 @@ class _RandomAccessFile extends _FileBase implements RandomAccessFile {
|
| }
|
|
|
| static void _checkReadWriteListArguments(int length, int offset, int bytes) {
|
| - if (offset < 0) throw new IndexOutOfRangeException(offset);
|
| - if (bytes < 0) throw new IndexOutOfRangeException(bytes);
|
| + if (offset < 0) throw new RangeError.value(offset);
|
| + if (bytes < 0) throw new RangeError.value(bytes);
|
| if ((offset + bytes) > length) {
|
| - throw new IndexOutOfRangeException(offset + bytes);
|
| + throw new RangeError.value(offset + bytes);
|
| }
|
| }
|
|
|
|
|