| Index: runtime/bin/directory.dart
|
| diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart
|
| index dd6bf149d09667dd7117d7b1fec2f7e547a691a6..5041837fe83bb8328de3afe7fbb7f81e48696253 100644
|
| --- a/runtime/bin/directory.dart
|
| +++ b/runtime/bin/directory.dart
|
| @@ -144,9 +144,22 @@ interface Directory default _Directory {
|
| }
|
|
|
|
|
| -class DirectoryException {
|
| - const DirectoryException([String this.message, int this.errorCode = 0]);
|
| - String toString() => "DirectoryException: $message";
|
| +class DirectoryIOException implements Exception {
|
| + const DirectoryIOException([String this.message = "",
|
| + OSError this.osError = null]);
|
| + String toString() {
|
| + StringBuffer sb = new StringBuffer();
|
| + sb.add("DirectoryIOException");
|
| + if (!message.isEmpty()) {
|
| + sb.add(": $message");
|
| + if (osError != null) {
|
| + sb.add(" ($osError)");
|
| + }
|
| + } else if (osError != null) {
|
| + sb.add(": $osError");
|
| + }
|
| + return sb.toString();
|
| + }
|
| final String message;
|
| - final int errorCode;
|
| + final OSError osError;
|
| }
|
|
|