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

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

Issue 913513003: Handle exception while getting modification stamp (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 | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/java_io.dart
diff --git a/pkg/analyzer/lib/src/generated/java_io.dart b/pkg/analyzer/lib/src/generated/java_io.dart
index 5e900d1ce69b6890104788008f9546d2112d6af8..e947d80a733c053cc3668b68ea10090a9988e674 100644
--- a/pkg/analyzer/lib/src/generated/java_io.dart
+++ b/pkg/analyzer/lib/src/generated/java_io.dart
@@ -71,9 +71,11 @@ class JavaFile {
return _newFile().existsSync();
}
int lastModified() {
- if (!_newFile().existsSync()) return 0;
- return _newFile().lastModifiedSync().millisecondsSinceEpoch;
-
+ try {
+ return _newFile().lastModifiedSync().millisecondsSinceEpoch;
+ } catch (exception) {
+ return -1;
+ }
}
List<JavaFile> listFiles() {
var files = <JavaFile>[];
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698