add FileSystemError.Unavailable, #47475

This commit is contained in:
Johannes Rieken
2018-05-02 10:56:59 +02:00
parent 08f8a4842d
commit 9bb39f2277
2 changed files with 10 additions and 0 deletions

View File

@@ -1881,6 +1881,9 @@ export class FileSystemError extends Error {
static NoPermissions(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'NoPermissions', FileSystemError.NoPermissions);
}
static Unavailable(messageOrUri?: string | URI): FileSystemError {
return new FileSystemError(messageOrUri, 'Unavailable', FileSystemError.Unavailable);
}
constructor(uriOrMessage?: string | URI, code?: string, terminator?: Function) {
super(URI.isUri(uriOrMessage) ? uriOrMessage.toString(true) : uriOrMessage);