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

Unified Diff: sdk/lib/core/string.dart

Issue 711003002: Add some ArgumentError and RangeError constructors that capture more information. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: sdk/lib/core/string.dart
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 8c8f8f042578db44fd548a8d6d220cb892d97209..b95c6e146a6ed9fe0d44573804ec7d3b384facaa 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -678,7 +678,7 @@ class RuneIterator implements BidirectionalIterator<int> {
*/
void set rawIndex(int rawIndex) {
if (rawIndex >= string.length) {
- throw new RangeError.range(rawIndex, 0, string.length - 1);
+ throw new RangeError.index(rawIndex, string);
}
reset(rawIndex);
moveNext();

Powered by Google App Engine
This is Rietveld 408576698