 Chromium Code Reviews
 Chromium Code Reviews Issue 1307363005:
  Add optional message argument to assert statements in the VM.  (Closed) 
  Base URL: https://github.com/dart-lang/sdk.git@master
    
  
    Issue 1307363005:
  Add optional message argument to assert statements in the VM.  (Closed) 
  Base URL: https://github.com/dart-lang/sdk.git@master| 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. */ | 
| 
Lasse Reichstein Nielsen
2016/11/24 15:13:36
Still not absolutely sure this should be public.
I
 | 
| + final Object message; | 
| + AssertionError([this.message]); | 
| String toString() => "Assertion failed"; | 
| } |