Skip to content

Commit

Permalink
add FileSystemError.Unavailable, #47475
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed May 2, 2018
1 parent fa542a7 commit e07f8ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
3 changes: 3 additions & 0 deletions src/vs/workbench/api/node/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e07f8ab

Please sign in to comment.