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

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

Issue 988533002: Guard against exception when accessing folder (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 29de8df6ea696817cbc3f0694d3b126e4dbc5287..8af64b3f40d93bef9ec327223660860c200bfc75 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -259,7 +259,14 @@ abstract class ContextManager {
if (info.excludesResource(folder)) {
return;
}
- List<Resource> children = folder.getChildren();
+ List<Resource> children;
+ try {
+ children = folder.getChildren();
+ } on FileSystemException catch (exception) {
+ // The folder no longer exists, or cannot be read, to there's nothing to
+ // do.
+ return;
+ }
for (Resource child in children) {
String path = child.path;
// add files, recurse into folders
« 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