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

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

Issue 11360224: Remove deprecated exception classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « pkg/unittest/lib/src/core_matchers.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/errors.dart
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index 2425189a868a9c87d2894f5555b36b06573d7e46..03b2798cfb7311c5e7e24e93e44ddbb19ec7281d 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -44,9 +44,8 @@ class ArgumentError implements Error {
/**
* Exception thrown because of an index outside of the valid range.
*
- * Temporarily implements [IndexOutOfRangeException] for backwards compatiblity.
*/
-class RangeError extends ArgumentError implements IndexOutOfRangeException {
+class RangeError extends ArgumentError {
// TODO(lrn): This constructor should be called only with string values.
// It currently isn't in all cases.
/**
@@ -54,7 +53,7 @@ class RangeError extends ArgumentError implements IndexOutOfRangeException {
*
* Temporarily made const for backwards compatibilty.
*/
- const RangeError(var message) : super(message);
+ RangeError(var message) : super(message);
/** Create a new [RangeError] with a message for the given [value]. */
RangeError.value(num value) : super("value $value");
@@ -62,26 +61,6 @@ class RangeError extends ArgumentError implements IndexOutOfRangeException {
String toString() => "RangeError: $message";
}
-/**
- * Temporary backwards compatibilty class.
- *
- * This class allows code throwing the old [IndexOutOfRangeException] to
- * work until they change to the new [RangeError] name.
- * Constructor of [RangeError] is const only to support this interface.
- */
-interface IndexOutOfRangeException extends Exception default RangeError {
- const IndexOutOfRangeException(var message);
-}
-
-
-/**
- * Temporary backwards compatibility class.
- *
- * Removed when users have had time to change to using [ArgumentError].
- */
-class IllegalArgumentException extends ArgumentError {
- const IllegalArgumentException([argument = ""]) : super(argument);
-}
/**
* Error thrown when control reaches the end of a switch case.
@@ -95,6 +74,7 @@ class FallThroughError implements Error {
const FallThroughError();
}
+
class AbstractClassInstantiationError implements Error {
final String _className;
const AbstractClassInstantiationError(String this._className);
@@ -219,25 +199,16 @@ class UnsupportedError implements Error {
* If a class is not intending to implement the feature, it should throw
* an [UnsupportedError] instead. This error is only intended for
* use during development.
- *
- * This class temporarily implements [Exception] for backwards compatibility.
- * The constructor is temporarily const to support [NotImplementedException].
*/
-class UnimplementedError implements UnsupportedError, NotImplementedException {
+class UnimplementedError implements UnsupportedError {
final String message;
- const UnimplementedError([String this.message]);
+ UnimplementedError([String this.message]);
String toString() => (this.message != null
? "UnimplementedError: $message"
: "UnimplementedError");
}
-/** Temporary class added for backwards compatibility. Will be removed. */
-interface NotImplementedException extends Exception default UnimplementedError {
- const NotImplementedException([String message]);
-}
-
-
/**
* The operation was not allowed by the current state of the object.
*
« no previous file with comments | « pkg/unittest/lib/src/core_matchers.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698