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

Unified Diff: lib/io/file_impl.dart

Issue 11275042: Renaming IndexOutOfRangeException to RangeError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerated html files. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/html/src/_Lists.dart ('k') | lib/scalarlist/byte_arrays.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « lib/html/src/_Lists.dart ('k') | lib/scalarlist/byte_arrays.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698