Index: sdk/lib/core/errors.dart |
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart |
index 34fcaeddf29cbe0c41346e4ee8d248a1e7d598a3..3368223243b3c85ee4184928ba28721daaf5cac3 100644 |
--- a/sdk/lib/core/errors.dart |
+++ b/sdk/lib/core/errors.dart |
@@ -229,16 +229,21 @@ class OutOfMemoryError implements Error { |
String toString() => "Out of Memory"; |
} |
+ |
class StackOverflowError implements Error { |
const StackOverflowError(); |
String toString() => "Stack Overflow"; |
} |
/** |
- * Error thrown when a runtime error occurs. |
+ * Error thrown when a lazily initialized variable cannot be initialized. |
+ * |
+ * A static/library variable with an initializer expression is initialized |
+ * the first time it is read. If evaluating the initializer expression causes |
+ * another read of the variable, this error is thrown. |
*/ |
-class RuntimeError implements Error { |
- final message; |
- RuntimeError(this.message); |
- String toString() => "RuntimeError: $message"; |
+class CyclicInitializationError implements Error { |
+ const CyclicInitializationError(); |
+ String toString() => |
+ "Reading static variable during its initialization"; |
} |