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

Unified Diff: pkg/compiler/lib/src/elements/modelx.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
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/invariant.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 709407c30f5e1c892b60910997192fae637a2ce0..e282c0be957c2c6ce5ba1396913f0ed3a80fa11f 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -967,8 +967,7 @@ abstract class LibraryDependencyElementX extends ElementX {
void set metadata(value) {
// The metadata is stored on [libraryDependency].
- throw new SpannableAssertionFailure(
- this, 'Cannot set metadata on a import/export.');
+ failedAt(this, 'Cannot set metadata on a import/export.');
}
@override
@@ -1095,7 +1094,7 @@ class LibraryElementX extends ElementX
void set metadata(value) {
// The metadata is stored on [libraryTag].
- throw new SpannableAssertionFailure(this, 'Cannot set metadata on Library');
+ failedAt(this, 'Cannot set metadata on Library');
}
CompilationUnitElement get compilationUnit => entryCompilationUnit;
@@ -3324,7 +3323,7 @@ abstract class MixinApplicationElementX extends BaseClassElementX
List<ResolutionDartType> computeTypeParameters(ParsingContext parsing) {
NamedMixinApplication named = node.asNamedMixinApplication();
if (named == null) {
- throw new SpannableAssertionFailure(
+ failedAt(
node,
"Type variables on unnamed mixin applications must be set on "
"creation.");
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/invariant.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698