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

Unified Diff: pkg/compiler/lib/src/resolution/resolution_strategy.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/resolution/resolution_strategy.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution_strategy.dart b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
index 00c66e2c89c5e0bfac29b49c1f42653cf2b79106..d843754336428e2d576a52603aed60b2b90127cd 100644
--- a/pkg/compiler/lib/src/resolution/resolution_strategy.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
@@ -469,7 +469,7 @@ class _CompilerElementEnvironment implements ElementEnvironment {
member = abstractField.getter;
}
if (member == null && required) {
- throw new SpannableAssertionFailure(
+ failedAt(
cls,
"The class '${cls.name}' does not contain required "
"${setter ? 'setter' : 'getter'}: '$name'.");
@@ -571,14 +571,14 @@ class _CompilerElementEnvironment implements ElementEnvironment {
member = abstractField.getter;
}
if (member == null && required) {
- throw new SpannableAssertionFailure(
+ failedAt(
library,
"The library '${library.canonicalUri}' does not contain required "
"${setter ? 'setter' : 'getter'}: '$name'.");
}
}
if (member == null && required) {
- throw new SpannableAssertionFailure(
+ failedAt(
member,
"The library '${library.libraryName}' does not "
"contain required member: '$name'.");
@@ -602,7 +602,7 @@ class _CompilerElementEnvironment implements ElementEnvironment {
{bool required: false}) {
ClassElement cls = library.implementation.findLocal(name);
if (cls == null && required) {
- throw new SpannableAssertionFailure(
+ failedAt(
library,
"The library '${library.libraryName}' does not "
"contain required class: '$name'.");
@@ -632,8 +632,7 @@ class _CompilerElementEnvironment implements ElementEnvironment {
return null;
}
if (library == null && required) {
- throw new SpannableAssertionFailure(
- NO_LOCATION_SPANNABLE, "The library '${uri}' was not found.");
+ failedAt(NO_LOCATION_SPANNABLE, "The library '${uri}' was not found.");
}
return library;
}
« no previous file with comments | « pkg/compiler/lib/src/parser/node_listener.dart ('k') | pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698