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/benchmark/benchmarks.dart

Issue 2992203002: ignore errors deleting the analysis driver cache. (Closed)
Patch Set: Created 3 years, 4 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/benchmark/benchmarks.dart
diff --git a/pkg/analysis_server/benchmark/benchmarks.dart b/pkg/analysis_server/benchmark/benchmarks.dart
index aed89bbe452f1fe853c145b69d44c0672af4cbe5..bfc24daad3e0e4f1e2fc3ed4f91ce8e4a7752474 100644
--- a/pkg/analysis_server/benchmark/benchmarks.dart
+++ b/pkg/analysis_server/benchmark/benchmarks.dart
@@ -225,5 +225,11 @@ void deleteServerCache() {
// ~/.dartServer/.analysis-driver/
ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
Folder stateLocation = resourceProvider.getStateLocation('.analysis-driver');
- stateLocation.delete();
+ try {
+ if (stateLocation.exists) {
+ stateLocation.delete();
+ }
+ } catch (e) {
+ // ignore any exception
+ }
}
« 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