Index: runtime/bin/directory.dart |
diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart |
index 5041837fe83bb8328de3afe7fbb7f81e48696253..3a919c7c994211d3e806db438de8ec373cd7c382 100644 |
--- a/runtime/bin/directory.dart |
+++ b/runtime/bin/directory.dart |
@@ -135,7 +135,7 @@ interface Directory default _Directory { |
* Sets the handler that is called if there is an error while listing |
* or creating directories. |
*/ |
- void set onError(void onError(String error)); |
+ void set onError(void onError(Exception e)); |
/** |
* Gets the path of this directory. |
@@ -146,20 +146,28 @@ interface Directory default _Directory { |
class DirectoryIOException implements Exception { |
const DirectoryIOException([String this.message = "", |
+ String this.path = "", |
OSError this.osError = null]); |
String toString() { |
StringBuffer sb = new StringBuffer(); |
sb.add("DirectoryIOException"); |
if (!message.isEmpty()) { |
sb.add(": $message"); |
+ if (path != null) { |
+ sb.add(", path = $path"); |
+ } |
if (osError != null) { |
sb.add(" ($osError)"); |
} |
} else if (osError != null) { |
sb.add(": $osError"); |
+ if (path != null) { |
+ sb.add(", path = $path"); |
+ } |
} |
return sb.toString(); |
} |
final String message; |
+ final String path; |
final OSError osError; |
} |