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

Unified Diff: lib/html/src/_Lists.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: 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);

Powered by Google App Engine
This is Rietveld 408576698