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 0017ebc9b16877df510e6ab71c831789f1b79945..3212539c5bfe89342af4400e6c14af63be8d5f61 100644 |
| --- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
| +++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
| @@ -861,15 +861,12 @@ class RuntimeError extends Error { |
| String toString() => "RuntimeError: $message"; |
| } |
| -/** |
| - * Error thrown when an assert() fails with a message: |
| - * |
| - * assert(false, "Message here"); |
| - */ |
| -class AssertionErrorWithMessage extends AssertionError { |
| - final Object _message; |
| - AssertionErrorWithMessage(this._message); |
| - String toString() => "Assertion failed: ${_message}"; |
| +/// Error thrown by DDC when an `assert()` fails (with or without a message). |
| +class AssertionErrorImpl extends AssertionError { |
| + AssertionErrorImpl(message) : super(message); |
| + String toString() => |
| + "Assertion failed: " + |
| + (message != null ? Error.safeToString(message) : "is not true"); |
|
Jennifer Messerly
2017/07/07 23:43:17
this uses Error.safeToString as dart2js does
VM/d
|
| } |
| /** |