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

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

Issue 2752163002: Format all dart dev compiler files (Closed)
Patch Set: Created 3 years, 9 months 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 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.

Powered by Google App Engine
This is Rietveld 408576698