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

Unified Diff: pkg/analyzer/lib/src/context/builder.dart

Issue 2660073002: ContextBuilder should to throw when a root folder does not exist. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/analysis_server/test/context_manager_test.dart ('k') | pkg/analyzer/test/src/context/builder_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/builder.dart
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 58301b7680db3f7264409ea157ab33823c2646ad..ba6926cd38f4e1b25f6f5cb7d455cef53de7d8b2 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -522,8 +522,9 @@ class ContextBuilder {
Resource _findPackagesLocation(String path) {
Folder folder = resourceProvider.getFolder(path);
if (!folder.exists) {
- throw new ArgumentError.value(path, "path", "Directory does not exist.");
+ return null;
}
+
File checkForConfigFile(Folder folder) {
File file = folder.getChildAssumingFile('.packages');
if (file.exists) {
« no previous file with comments | « pkg/analysis_server/test/context_manager_test.dart ('k') | pkg/analyzer/test/src/context/builder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698