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

Unified Diff: lib/core/exceptions.dart

Issue 11229003: Revert "Rename OutOfMemoryException to OutOfMemoryError." (Closed) Base URL: https://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
« no previous file with comments | « lib/core/errors.dart ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/core/exceptions.dart
diff --git a/lib/core/exceptions.dart b/lib/core/exceptions.dart
index c57603a76ee85ca82d8f43421015be3a24caa549..e6ee7ac61cb07065273da5555881591374f705ca 100644
--- a/lib/core/exceptions.dart
+++ b/lib/core/exceptions.dart
@@ -8,21 +8,11 @@
* Interface implemented by all core library exceptions.
* Defaults to an implementation that only carries a simple message.
*/
-interface Exception default _ExceptionImplementation {
- // TODO(lrn): This should be an abstract class, but we don't yet support
- // redirecting factory constructors.
+interface Exception default ExceptionImplementation {
const Exception([var message]);
}
-/** Default implementation of [Exception] which carries a message. */
-class _ExceptionImplementation implements Exception {
- final message;
- const _ExceptionImplementation([this.message]);
- String toString() => (message == null) ? "Exception" : "Exception: $message";
-}
-
-
/**
* Exception thrown because of an index outside of the valid range.
*/
@@ -34,6 +24,7 @@ class IndexOutOfRangeException implements Exception {
final _value;
}
+
/**
* Exception thrown because of attempt to modify an immutable object.
*/
@@ -55,6 +46,12 @@ class ObjectNotClosureException implements Exception {
}
+class OutOfMemoryException implements Exception {
+ const OutOfMemoryException();
+ String toString() => "Out of Memory";
+}
+
+
class StackOverflowException implements Exception {
const StackOverflowException();
String toString() => "Stack Overflow";
« no previous file with comments | « lib/core/errors.dart ('k') | lib/coreimpl/coreimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698