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

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

Issue 2574003003: Add optional message argument to assert statements in the VM. (Closed)
Patch Set: Update dart2js status file Created 4 years 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 | « runtime/vm/symbols.h ('k') | tests/language/assert_message_test.dart » ('j') | 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 c11ea2e1a97da25e0c73490a216d7ec025492dc6..b6487a9dffebbce057267a7d014a6f01032f958e 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -96,7 +96,9 @@ class Error {
* Error thrown by the runtime system when an assert statement fails.
*/
class AssertionError extends Error {
- AssertionError();
+ /** Message describing the assertion error. */
+ final Object message;
+ AssertionError([this.message]);
String toString() => "Assertion failed";
}
« no previous file with comments | « runtime/vm/symbols.h ('k') | tests/language/assert_message_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698