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

Unified Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 2982783003: Use failedAt in more places (Closed)
Patch Set: Created 3 years, 5 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/compiler/lib/src/js_backend/namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 2ef33ba22b62de97c94d6ad4049db392b1cd4ac0..4ecbd8160a40114fc5b744637d380c536367f3e8 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -665,8 +665,7 @@ class Namer {
case JsGetName.FUNCTION_CLASS_TYPE_NAME:
return runtimeTypeName(_commonElements.functionClass);
default:
- throw new SpannableAssertionFailure(
- spannable, 'Error: Namer has no name for "$name".');
+ throw failedAt(spannable, 'Error: Namer has no name for "$name".');
}
}
@@ -853,7 +852,7 @@ class Namer {
return disambiguatedName; // Methods other than call are not annotated.
default:
- throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE,
+ throw failedAt(CURRENT_ELEMENT_SPANNABLE,
'Unexpected selector kind: ${selector.kind}');
}
}
@@ -1964,7 +1963,7 @@ class ConstantNamingVisitor implements ConstantValueVisitor {
add('name');
break;
default:
- throw new SpannableAssertionFailure(
+ failedAt(
CURRENT_ELEMENT_SPANNABLE, "Unexpected SyntheticConstantValue");
}
}
@@ -2079,7 +2078,7 @@ class ConstantCanonicalHasher implements ConstantValueVisitor<int, Null> {
// resolve to integer indexes, they're always part of a larger constant.
return 0;
default:
- throw new SpannableAssertionFailure(
+ throw failedAt(
NO_LOCATION_SPANNABLE,
'SyntheticConstantValue should never be named and '
'never be subconstant');
« no previous file with comments | « pkg/compiler/lib/src/js_backend/enqueuer.dart ('k') | pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698