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

Unified Diff: runtime/lib/growable_array.dart

Issue 10989013: Change IllegalArgumentException to ArgumentError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated co19 test expectations. Created 8 years, 3 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: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index b36f6619c395c15778e2db00f30c4f2f7e038bda..d695d92be233a2df2c0477d6956c83c12ba317f5 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -9,7 +9,7 @@ class GrowableObjectArray<T> implements List<T> {
}
T removeAt(int index) {
- if (index is! int) throw new IllegalArgumentException(index);
+ if (index is! int) throw new ArgumentError(index);
T result = this[index];
int newLength = this.length - 1;
Arrays.copy(this,
@@ -23,7 +23,7 @@ class GrowableObjectArray<T> implements List<T> {
void setRange(int start, int length, List<T> from, [int startFrom = 0]) {
if (length < 0) {
- throw new IllegalArgumentException("negative length $length");
+ throw new ArgumentError("negative length $length");
}
Arrays.copy(from, startFrom, this, start, length);
}
@@ -46,7 +46,7 @@ class GrowableObjectArray<T> implements List<T> {
return;
}
if ((length < 0) || (length is! int)) {
- throw new IllegalArgumentException("invalid length specified $length");
+ throw new ArgumentError("invalid length specified $length");
}
if (start < 0 || start > this.length) {
throw new IndexOutOfRangeException(start);

Powered by Google App Engine
This is Rietveld 408576698