Index: lib/html/src/_Lists.dart |
diff --git a/lib/html/src/_Lists.dart b/lib/html/src/_Lists.dart |
index 002c1fc671ac02ecf348b2d03ad252a8e911931a..712600c0aa2bb8091775500eb42bcacceafd4f66 100644 |
--- a/lib/html/src/_Lists.dart |
+++ b/lib/html/src/_Lists.dart |
@@ -51,12 +51,12 @@ class _Lists { |
* Returns a sub list copy of this list, from [start] to |
* [:start + length:]. |
* Returns an empty list if [length] is 0. |
- * Throws an [IllegalArgumentException] if [length] is negative. |
+ * Throws an [ArgumentError] if [length] is negative. |
* Throws an [IndexOutOfRangeException] if [start] or |
* [:start + length:] are out of range. |
*/ |
static List getRange(List a, int start, int length, List accumulator) { |
- if (length < 0) throw new IllegalArgumentException('length'); |
+ if (length < 0) throw new ArgumentError('length'); |
if (start < 0) throw new IndexOutOfRangeException(start); |
int end = start + length; |
if (end > a.length) throw new IndexOutOfRangeException(end); |