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

Unified Diff: sdk/lib/internal/list.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/internal/list.dart
diff --git a/sdk/lib/internal/list.dart b/sdk/lib/internal/list.dart
index 43e7e6a730efe8019b5c8fe5227d57734660330e..71e08f80de5d9a483de247ed59f7c823c2fa0a88 100644
--- a/sdk/lib/internal/list.dart
+++ b/sdk/lib/internal/list.dart
@@ -239,7 +239,7 @@ class _ListIndicesIterable extends ListIterable<int> {
int get length => _backedList.length;
int elementAt(int index) {
if (index < 0 || index >= length) {
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
}
return index;
}

Powered by Google App Engine
This is Rietveld 408576698