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

Unified Diff: lib/html/src/_Lists.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/html/src/_Lists.dart
diff --git a/lib/html/src/_Lists.dart b/lib/html/src/_Lists.dart
index 712600c0aa2bb8091775500eb42bcacceafd4f66..41007d97e463eb343da7d6b79ed2a3e0f905b33a 100644
--- a/lib/html/src/_Lists.dart
+++ b/lib/html/src/_Lists.dart
@@ -52,14 +52,14 @@ class _Lists {
* [:start + length:].
* Returns an empty list if [length] is 0.
* Throws an [ArgumentError] if [length] is negative.
- * Throws an [IndexOutOfRangeException] if [start] or
+ * Throws an [RangeError] if [start] or
floitsch 2012/10/25 14:31:38 Throws a [RangeError]
* [:start + length:] are out of range.
*/
static List getRange(List a, int start, int length, List accumulator) {
if (length < 0) throw new ArgumentError('length');
- if (start < 0) throw new IndexOutOfRangeException(start);
+ if (start < 0) throw new RangeError(start);
int end = start + length;
- if (end > a.length) throw new IndexOutOfRangeException(end);
+ if (end > a.length) throw new RangeError(end);
for (int i = start; i < end; i++) {
accumulator.add(a[i]);
}

Powered by Google App Engine
This is Rietveld 408576698