From 9bb39f227713decf403da38525905cdb8ad2165c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 2 May 2018 10:56:59 +0200 Subject: [PATCH] add FileSystemError.Unavailable, #47475 --- src/vs/vscode.d.ts | 7 +++++++ src/vs/workbench/api/node/extHostTypes.ts | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 637db4d6f06..daa6482d318 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4893,6 +4893,13 @@ declare module 'vscode' { */ static NoPermissions(messageOrUri?: string | Uri): FileSystemError; + /** + * Create an error to signal that the file system is unavailable or too busy to + * complete a request. + * @param messageOrUri Message or uri. + */ + static Unavailable(messageOrUri?: string | Uri): FileSystemError; + /** * Creates a new filesystem error. * diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 492ac346fb9..7d66e05515d 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -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); -- GitLab