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

Unified Diff: sdk/lib/svg/dart2js/svg_dart2js.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/svg/dart2js/svg_dart2js.dart
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index 3486ba0271f7154410aed1562fcfe1eb89fbb75d..bcd5d071e1595c1994a503946ffc69a8f5a77b82 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -2683,7 +2683,7 @@ class LengthList extends Interceptor with ListMixin<Length>, ImmutableListMixin<
Length operator[](int index) {
if (JS("bool", "# >>> 0 !== # || # >= #", index,
index, index, length))
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
return this.getItem(index);
}
void operator[]=(int index, Length value) {
@@ -3135,7 +3135,7 @@ class NumberList extends Interceptor with ListMixin<Number>, ImmutableListMixin<
Number operator[](int index) {
if (JS("bool", "# >>> 0 !== # || # >= #", index,
index, index, length))
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
return this.getItem(index);
}
void operator[]=(int index, Number value) {
@@ -3922,7 +3922,7 @@ class PathSegList extends Interceptor with ListMixin<PathSeg>, ImmutableListMixi
PathSeg operator[](int index) {
if (JS("bool", "# >>> 0 !== # || # >= #", index,
index, index, length))
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
return this.getItem(index);
}
void operator[]=(int index, PathSeg value) {
@@ -4617,7 +4617,7 @@ class StringList extends Interceptor with ListMixin<String>, ImmutableListMixin<
String operator[](int index) {
if (JS("bool", "# >>> 0 !== # || # >= #", index,
index, index, length))
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
return this.getItem(index);
}
void operator[]=(int index, String value) {
@@ -6077,7 +6077,7 @@ class TransformList extends Interceptor with ListMixin<Transform>, ImmutableList
Transform operator[](int index) {
if (JS("bool", "# >>> 0 !== # || # >= #", index,
index, index, length))
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
return this.getItem(index);
}
void operator[]=(int index, Transform value) {

Powered by Google App Engine
This is Rietveld 408576698