This commit is contained in:
Johannes Rieken
2017-11-08 10:33:29 +01:00
parent bc04f0cb3d
commit 04fc390148
2 changed files with 10 additions and 6 deletions

View File

@@ -460,8 +460,15 @@ class RenameAdapter {
edits: undefined,
rejectReason: err
};
} else if (err instanceof Error && typeof err.message === 'string') {
return <modes.WorkspaceEdit>{
edits: undefined,
rejectReason: err.message
};
} else {
// generic error
return TPromise.wrapError<modes.WorkspaceEdit>(err);
}
return TPromise.wrapError<modes.WorkspaceEdit>(err);
});
}
}