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

Unified Diff: sdk/lib/io/file.dart

Issue 18090003: Add FileException.path and clean up file exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: CLean up test and remove debug code. Created 7 years, 6 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 | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/file.dart
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index 450a9020abb0920d6203897039b5173815366477..2115d31971a121ab22a0a4e61d86a71eb17624ee 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -525,21 +525,30 @@ abstract class RandomAccessFile {
class FileException implements IOException {
+ final String message;
+ final String path;
+ final OSError osError;
const FileException([String this.message = "",
- OSError this.osError = null]);
+ String this.path = "",
+ OSError this.osError]);
+
String toString() {
StringBuffer sb = new StringBuffer();
sb.write("FileException");
if (!message.isEmpty) {
sb.write(": $message");
+ if (path != null) {
+ sb.write(", path = $path");
+ }
if (osError != null) {
sb.write(" ($osError)");
}
} else if (osError != null) {
sb.write(": osError");
+ if (path != null) {
+ sb.write(", path = $path");
+ }
}
return sb.toString();
}
- final String message;
- final OSError osError;
}
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698