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

Unified Diff: lib/compiler/implementation/lib/js_helper.dart

Issue 11275042: Renaming IndexOutOfRangeException to RangeError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months 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
Index: lib/compiler/implementation/lib/js_helper.dart
diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart
index e5476d45799af63c012c1651b46f318d88efaabe..49a65bca5efd1fcff06b3545c1b8ed6549f40997 100644
--- a/lib/compiler/implementation/lib/js_helper.dart
+++ b/lib/compiler/implementation/lib/js_helper.dart
@@ -299,7 +299,7 @@ index$slow(var a, var index) {
if (!identical(index.truncate(), index)) throw new ArgumentError(index);
}
if (index < 0 || index >= a.length) {
- throw new IndexOutOfRangeException(index);
+ throw new RangeError(index);
}
return JS('Object', r'#[#]', a, index);
}
@@ -312,7 +312,7 @@ void indexSet$slow(var a, var index, var value) {
throw new ArgumentError(index);
}
if (index < 0 || index >= a.length) {
- throw new IndexOutOfRangeException(index);
+ throw new RangeError(index);
}
checkMutable(a, 'indexed set');
JS('Object', r'#[#] = #', a, index, value);
@@ -671,7 +671,7 @@ iae(argument) {
* access.
*/
ioore(index) {
- throw new IndexOutOfRangeException(index);
+ throw new RangeError(index);
}
listInsertRange(receiver, start, length, initialValue) {
@@ -686,7 +686,7 @@ listInsertRange(receiver, start, length, initialValue) {
var receiverLength = JS('num', r'#.length', receiver);
if (start < 0 || start > receiverLength) {
- throw new IndexOutOfRangeException(start);
+ throw new RangeError(start);
}
receiver.length = receiverLength + length;
Arrays.copy(receiver,

Powered by Google App Engine
This is Rietveld 408576698