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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 995873002: Handle IO exception in ContextManager (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 7f4ba1ecf54b7c4458d3bc6d8651d38fba14bc74..d587b0a358231d5d2e090d193a5abc45debca981 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -423,11 +423,16 @@ abstract class ContextManager {
}
// try to find subfolders with pubspec files
List<_ContextInfo> children = <_ContextInfo>[];
- for (Resource child in folder.getChildren()) {
- if (child is Folder) {
- List<_ContextInfo> childContexts = _createContexts(child, true);
- children.addAll(childContexts);
+ try {
+ for (Resource child in folder.getChildren()) {
+ if (child is Folder) {
+ List<_ContextInfo> childContexts = _createContexts(child, true);
+ children.addAll(childContexts);
+ }
}
+ } on FileSystemException {
+ // The directory either doesn't exist or cannot be read. Either way, there
+ // are no subfolders that need to be added.
}
// no pubspec, done
if (withPubspecOnly) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698