Chromium Code Reviews| Index: lib/core/errors.dart |
| diff --git a/lib/core/errors.dart b/lib/core/errors.dart |
| index ef4c135a460087f40287bff6daa3e7e4355d9562..610e90900a20ca7928a75b5e82f567b046fcef21 100644 |
| --- a/lib/core/errors.dart |
| +++ b/lib/core/errors.dart |
| @@ -209,6 +209,34 @@ class UnsupportedError implements Error { |
| String toString() => "Unsupported operation: $message"; |
| } |
| + |
| +/** |
| + * This operation has not been implemented yet. |
|
floitsch
2012/11/02 12:02:32
Sounds too much as if this class itself is not imp
Lasse Reichstein Nielsen
2012/11/02 12:15:40
Reworded.
|
| + * |
| + * 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. I.e., this error is only inteded for |
|
floitsch
2012/11/02 12:02:32
I think there is a push from documentation-people
Lasse Reichstein Nielsen
2012/11/02 12:15:40
Bowdlerizers!
"I.e.," removed.
|
| + * 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. |
| * |