Index: sdk/lib/core/errors.dart |
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart |
index 0e99b0b271ce48375f613c2fc9522aad6d0e5019..5d6ac7fcc03ad3594f3daae878ee009a19643694 100644 |
--- a/sdk/lib/core/errors.dart |
+++ b/sdk/lib/core/errors.dart |
@@ -96,6 +96,11 @@ class Error { |
* Error thrown by the runtime system when an assert statement fails. |
*/ |
class AssertionError extends Error { |
+ final Object message; |
+ AssertionError([this.message]); |
+ String toString() => |
+ "Assertion failed: ${message == null ? "is not true." |
+ : Error.safeToString(message)}"; |
} |
/** |