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

Unified Diff: runtime/lib/string_base.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: runtime/lib/string_base.dart
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index 9bc0264668ca62738d6ba57352f6d7e42a90c012..6471f837de29c79e9509e28c6bcc80be68f89fab 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -144,13 +144,13 @@ class _StringBase {
if (endIndex === null) endIndex = this.length;
if ((startIndex < 0) || (startIndex > this.length)) {
- throw new IndexOutOfRangeException(startIndex);
+ throw new RangeError(startIndex);
}
if ((endIndex < 0) || (endIndex > this.length)) {
- throw new IndexOutOfRangeException(endIndex);
+ throw new RangeError(endIndex);
}
if (startIndex > endIndex) {
- throw new IndexOutOfRangeException(startIndex);
+ throw new RangeError(startIndex);
}
return _substringUnchecked(startIndex, endIndex);
}
@@ -469,7 +469,7 @@ class _StringMatch implements Match {
String group(int group) {
if (group != 0) {
- throw new IndexOutOfRangeException(group);
+ throw new RangeError(group);
}
return pattern;
}

Powered by Google App Engine
This is Rietveld 408576698