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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart

Issue 2568313002: Implement messages in assert() in dev_compiler. (Closed)
Patch Set: 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
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
index 244a603a082c32421564a9e94fe32254c4de9285..4fc1b2fed15a1c26c7938367dbbe4d01f07d5843 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
@@ -41,6 +41,13 @@ throwAssertionError() => JS('', '''(() => {
$throw_(new $AssertionError());
})()''');
+throwAssertionErrorWithMessage(message) => JS(
Jennifer Messerly 2016/12/12 22:36:02 this can be removed per earlier suggestion
Bob Nystrom 2016/12/13 19:29:51 Done.
+ '',
+ '''(() => {
+ debugger;
+ $throw_(new $AssertionErrorWithMessage($message));
+})()''');
+
throwNullValueError() => JS('', '''(() => {
// TODO(vsm): Per spec, we should throw an NSM here. Technically, we ought
// to thread through method info, but that uglifies the code and can't

Powered by Google App Engine
This is Rietveld 408576698