Chromium Code Reviews| Index: pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
| diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
| index 351d94d0195a1078c545dbbe257777290b51ca05..336eaa20047ac2e9bea880b14bac082c08a1d96d 100644 |
| --- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
| +++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
| @@ -851,6 +851,17 @@ class RuntimeError extends Error { |
| } |
| /** |
| + * Error thrown when an assert() fails with a message: |
| + * |
| + * assert(false, "Message here"); |
| + */ |
| +class AssertionErrorWithMessage extends AssertionError { |
|
Jennifer Messerly
2016/12/12 22:36:02
do we need a special subtype for this, or was that
Bob Nystrom
2016/12/13 19:29:51
This is how dart2js does it, but that's not why I
|
| + final Object _message; |
| + AssertionErrorWithMessage(this._message); |
| + String toString() => "Assertion failed: ${_message}"; |
| +} |
| + |
| +/** |
| * Creates a random number with 64 bits of randomness. |
| * |
| * This will be truncated to the 53 bits available in a double. |