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 b432d3eaf214653eb79bf07de6c4b5d1e78d8768..ca60086c582891da054faac25c12be53fd4eb6e6 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 |
@@ -15,40 +15,52 @@ void ignoreWhitelistedErrors(bool flag) { |
_ignoreWhitelistedErrors = flag; |
} |
-throwCastError(object, actual, type) => JS('', '''(() => { |
+throwCastError(object, actual, type) => JS( |
+ '', |
+ '''(() => { |
var found = $typeName($actual); |
var expected = $typeName($type); |
if ($_trapRuntimeErrors) debugger; |
$throw_(new $CastErrorImplementation($object, found, expected)); |
})()'''); |
-throwTypeError(object, actual, type) => JS('', '''(() => { |
+throwTypeError(object, actual, type) => JS( |
+ '', |
+ '''(() => { |
var found = $typeName($actual); |
var expected = $typeName($type); |
if ($_trapRuntimeErrors) debugger; |
$throw_(new $TypeErrorImplementation($object, found, expected)); |
})()'''); |
-throwStrongModeCastError(object, actual, type) => JS('', '''(() => { |
+throwStrongModeCastError(object, actual, type) => JS( |
+ '', |
+ '''(() => { |
var found = $typeName($actual); |
var expected = $typeName($type); |
if ($_trapRuntimeErrors) debugger; |
$throw_(new $StrongModeCastError($object, found, expected)); |
})()'''); |
-throwStrongModeTypeError(object, actual, type) => JS('', '''(() => { |
+throwStrongModeTypeError(object, actual, type) => JS( |
+ '', |
+ '''(() => { |
var found = $typeName($actual); |
var expected = $typeName($type); |
if ($_trapRuntimeErrors) debugger; |
$throw_(new $StrongModeTypeError($object, found, expected)); |
})()'''); |
-throwUnimplementedError(message) => JS('', '''(() => { |
+throwUnimplementedError(message) => JS( |
+ '', |
+ '''(() => { |
if ($_trapRuntimeErrors) debugger; |
$throw_(new $UnimplementedError($message)); |
})()'''); |
-throwAssertionError([message]) => JS('', '''(() => { |
+throwAssertionError([message]) => JS( |
+ '', |
+ '''(() => { |
if ($_trapRuntimeErrors) debugger; |
let error = $message != null |
? new $AssertionErrorWithMessage($message()) |
@@ -56,7 +68,9 @@ throwAssertionError([message]) => JS('', '''(() => { |
$throw_(error); |
})()'''); |
-throwNullValueError() => JS('', '''(() => { |
+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 |
// actually be queried ... it only affects how the error is printed. |