| Index: sdk/lib/io/link.dart
|
| diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart
|
| index 955622fbebc7322859db217b31dea1e24191d0f9..a5cd3d1c64eda17bf642d3799bec6dd5dde6c77c 100644
|
| --- a/sdk/lib/io/link.dart
|
| +++ b/sdk/lib/io/link.dart
|
| @@ -146,7 +146,7 @@ class _Link extends FileSystemEntity implements Link {
|
| target = _makeWindowsLinkTarget(target);
|
| }
|
| var result = _File._createLink(path, target);
|
| - throwIfError(result, "Cannot create link '$path'");
|
| + throwIfError(result, "Cannot create link", path);
|
| }
|
|
|
| // Put target into the form "\??\C:\my\target\dir".
|
| @@ -188,7 +188,7 @@ class _Link extends FileSystemEntity implements Link {
|
|
|
| void deleteSync() {
|
| var result = _File._deleteLink(path);
|
| - throwIfError(result, "Cannot delete link '$path'");
|
| + throwIfError(result, "Cannot delete link", path);
|
| }
|
|
|
| Future<String> target() {
|
| @@ -207,13 +207,13 @@ class _Link extends FileSystemEntity implements Link {
|
|
|
| String targetSync() {
|
| var result = _File._linkTarget(path);
|
| - throwIfError(result, "Cannot read link '$path'");
|
| + throwIfError(result, "Cannot read link", path);
|
| return result;
|
| }
|
|
|
| - static throwIfError(Object result, String msg) {
|
| + static throwIfError(Object result, String msg, [String path = ""]) {
|
| if (result is OSError) {
|
| - throw new LinkException(msg, result);
|
| + throw new LinkException(msg, path, result);
|
| }
|
| }
|
|
|
| @@ -245,8 +245,8 @@ class _Link extends FileSystemEntity implements Link {
|
|
|
| class LinkException implements IOException {
|
| const LinkException([String this.message = "",
|
| - String this.path = "",
|
| - OSError this.osError = null]);
|
| + String this.path = "",
|
| + OSError this.osError = null]);
|
| String toString() {
|
| StringBuffer sb = new StringBuffer();
|
| sb.write("LinkException");
|
|
|