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

Unified Diff: runtime/bin/directory.dart

Issue 9630012: Error reporting on File in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: runtime/bin/directory.dart
diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart
index dd6bf149d09667dd7117d7b1fec2f7e547a691a6..845bb9b8a43c6c632d858fc1448d5287390ce16f 100644
--- a/runtime/bin/directory.dart
+++ b/runtime/bin/directory.dart
@@ -145,8 +145,14 @@ interface Directory default _Directory {
class DirectoryException {
- const DirectoryException([String this.message, int this.errorCode = 0]);
- String toString() => "DirectoryException: $message";
+ const DirectoryException(String this.message, [this.osError = null]);
+ String toString() {
+ String result = "DirectoryException: $message";
+ if (osError != null) {
+ result = "$result (${osError.toString()})";
+ }
+ return result;
+ }
final String message;
- final int errorCode;
+ final OSError osError;
}

Powered by Google App Engine
This is Rietveld 408576698