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

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: Regenerated html files. Created 8 years, 1 month 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
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/tests/vm/dart/byte_array_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_base.dart
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index 9f485460dd176e21b1a12f20f01a493bfd97100c..11b594ed9e562cebc71e654acdb8b433678031f5 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.value(startIndex);
}
if ((endIndex < 0) || (endIndex > this.length)) {
- throw new IndexOutOfRangeException(endIndex);
+ throw new RangeError.value(endIndex);
}
if (startIndex > endIndex) {
- throw new IndexOutOfRangeException(startIndex);
+ throw new RangeError.value(startIndex);
}
return _substringUnchecked(startIndex, endIndex);
}
@@ -468,7 +468,7 @@ class _StringMatch implements Match {
String group(int group) {
if (group != 0) {
- throw new IndexOutOfRangeException(group);
+ throw new RangeError.value(group);
}
return pattern;
}
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/tests/vm/dart/byte_array_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698