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

Unified Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 1572073003: Don't log stack trace for a bad package URL in a source file. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 3c25f11515a37258a001973ff0c6a2f71fedea9d..950f36e0abf325bacace6e47493e8f3f2bababef 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -834,8 +834,13 @@ class SourceFactory {
// Check .packages and update target and actual URIs as appropriate.
if (_packages != null && containedUri.scheme == 'package') {
- Uri packageUri =
- _packages.resolve(containedUri, notFound: (Uri packageUri) => null);
+ Uri packageUri = null;
+ try {
+ packageUri =
+ _packages.resolve(containedUri, notFound: (Uri packageUri) => null);
+ } on ArgumentError {
+ // Fall through to try resolvers.
+ }
if (packageUri != null) {
Brian Wilkerson 2016/01/09 16:02:39 This 'if' ought to be inside the 'try' because pac
skybrian 2016/01/09 19:26:45 That's true but it seems like it would be less cle
Brian Wilkerson 2016/01/10 16:55:25 I disagree (hence the comment), but it's your call
// Ensure scheme is set.
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | pkg/analyzer/test/generated/all_the_rest_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698