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

Unified Diff: lib/core/errors.dart

Issue 11358060: Change NotImplementedException to UnimplementedError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. 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 | « lib/compiler/implementation/lib/isolate_patch.dart ('k') | lib/core/exceptions.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/core/errors.dart
diff --git a/lib/core/errors.dart b/lib/core/errors.dart
index ef4c135a460087f40287bff6daa3e7e4355d9562..fec2de5295fb11943e74ca610d4eb28e3bbaac05 100644
--- a/lib/core/errors.dart
+++ b/lib/core/errors.dart
@@ -209,6 +209,35 @@ class UnsupportedError implements Error {
String toString() => "Unsupported operation: $message";
}
+
+/**
+ * Thrown by operations that have not been implemented yet.
+ *
+ * This [Error] is thrown by unfinished code that hasn't yet implemented
+ * all the features it needs.
+ *
+ * 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 {
+ final String message;
+ const 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 | « lib/compiler/implementation/lib/isolate_patch.dart ('k') | lib/core/exceptions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698