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

Unified Diff: sdk/lib/_internal/compiler/js_lib/native_typed_data.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/compiler/js_lib/native_typed_data.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart b/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
index f1ebae51ff48fbcc88720d568957579bddd54366..3267296bec6375bb31e9041eed3c1c0f7c495af2 100644
--- a/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
+++ b/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
@@ -149,7 +149,7 @@ class NativeFloat32x4List
void _invalidIndex(int index, int length) {
if (index < 0 || index >= length) {
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
} else {
throw new ArgumentError('Invalid list index $index');
}
@@ -255,7 +255,7 @@ class NativeInt32x4List
void _invalidIndex(int index, int length) {
if (index < 0 || index >= length) {
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
} else {
throw new ArgumentError('Invalid list index $index');
}
@@ -361,7 +361,7 @@ class NativeFloat64x2List
void _invalidIndex(int index, int length) {
if (index < 0 || index >= length) {
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
} else {
throw new ArgumentError('Invalid list index $index');
}
@@ -438,7 +438,7 @@ class NativeTypedData implements TypedData {
void _invalidIndex(int index, int length) {
if (index < 0 || index >= length) {
- throw new RangeError.range(index, 0, length);
+ throw new RangeError.index(index, this);
} else {
throw new ArgumentError('Invalid list index $index');
}

Powered by Google App Engine
This is Rietveld 408576698