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

Unified Diff: lib/core/errors.dart

Issue 11227021: Change StackOverflowException to be an Error. (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/compiler/implementation/lib/js_helper.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 97465fc23149b9a3da68a5cf9ce35495e111b537..20a277eb83f05ee6cb7a646effe2c710ac774149 100644
--- a/lib/core/errors.dart
+++ b/lib/core/errors.dart
@@ -17,8 +17,7 @@ class CastError implements Error {
/**
* Error thrown when a function is passed an unacceptable argument.
- */
-class ArgumentError implements Error {
+ */class ArgumentError implements Error {
final message;
/** The [message] describes the erroneous argument. */
@@ -41,7 +40,14 @@ class IllegalArgumentException extends ArgumentError {
const IllegalArgumentException([argument = ""]) : super(argument);
}
-
+/**
+ * Error thrown when control reaches the end of a switch case.
+ *
+ * The Dart specification requires this error to be thrown when
+ * control reaches the end of a switch case (except the last case
+ * of a switch) without meeting a break or similar end of the control
+ * flow.
+ */
class FallThroughError implements Error {
const FallThroughError();
}
@@ -131,7 +137,12 @@ class NoSuchMethodError implements Error {
}
-class OutOfMemoryError implements Exception {
+class OutOfMemoryError implements Error {
const OutOfMemoryError();
String toString() => "Out of Memory";
}
+
+class StackOverflowError implements Error {
+ const StackOverflowError();
+ String toString() => "Stack Overflow";
+}
« no previous file with comments | « lib/compiler/implementation/lib/js_helper.dart ('k') | lib/core/exceptions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698