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

Unified Diff: lib/core/errors.dart

Issue 11275042: Renaming IndexOutOfRangeException to RangeError. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months 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: lib/core/errors.dart
diff --git a/lib/core/errors.dart b/lib/core/errors.dart
index eca6fea8f426adfa811e263be69e811da3b20fac..f41e366ca676582c44f0e3206014f7d8dd4af674 100644
--- a/lib/core/errors.dart
+++ b/lib/core/errors.dart
@@ -42,6 +42,14 @@ class CastError implements Error {
}
/**
+ * Exception thrown because of an index outside of the valid range.
+ */
+class RangeError extends ArgumentError {
+ RangeError(int value) : super("Value of of range: $value");
floitsch 2012/10/25 14:31:38 Value out of range Make it a 'num' ?
Lasse Reichstein Nielsen 2012/10/26 11:30:22 Done.
+}
+
+
+/**
* Temporary backwards compatibility class.
*
* Removed when users have had time to change to using [ArgumentError].

Powered by Google App Engine
This is Rietveld 408576698