Chromium Code Reviews| Index: lib/core/errors.dart |
| diff --git a/lib/core/errors.dart b/lib/core/errors.dart |
| index ef4c135a460087f40287bff6daa3e7e4355d9562..89bf2c94e598130392a85a5995586036e078396b 100644 |
| --- a/lib/core/errors.dart |
| +++ b/lib/core/errors.dart |
| @@ -209,6 +209,34 @@ class UnsupportedError implements Error { |
| String toString() => "Unsupported operation: $message"; |
| } |
| + |
| +/** |
| + * Thrown by operations that have not yet been implemented. |
|
floitsch
2012/11/02 12:25:12
have not been implemented yet ?
Lasse Reichstein Nielsen
2012/11/02 12:35:38
Done.
|
| + * |
| + * This [Error] is thrown by unfinished code that hasn't yet implemented |
| + * all the features it needs. |
|
floitsch
2012/11/02 12:25:12
If you intend to have a line-break in the output,
Lasse Reichstein Nielsen
2012/11/02 12:35:38
Done.
|
| + * 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. |
| * |