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

Unified Diff: sdk/lib/core/errors.dart

Issue 1307363005: Add optional message argument to assert statements in the VM. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/errors.dart
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index 0e99b0b271ce48375f613c2fc9522aad6d0e5019..f8b55b17cb014fa6472043beb8a824eef739b758 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -96,6 +96,9 @@ class Error {
* Error thrown by the runtime system when an assert statement fails.
*/
class AssertionError extends Error {
+ /** Message describing the assertion error. */
+ final Object message;
sra1 2015/09/02 18:00:27 1. Is the intention to also give TypeError a messa
Lasse Reichstein Nielsen 2015/09/03 07:42:04 No, but it's an inadvertent consequence of making
+ AssertionError([this.message]);
}
/**
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698