rename FileError to FileSystemError, #47475

This commit is contained in:
Johannes Rieken
2018-04-19 18:31:38 +02:00
parent c1cd4378c5
commit 45b1679035
3 changed files with 15 additions and 15 deletions

View File

@@ -692,7 +692,7 @@ export function createApiFactory(
FileChangeType2: extHostTypes.FileChangeType2,
FileType2: extHostTypes.FileType2,
FileOpenFlags: files.FileOpenFlags,
FileError: extHostTypes.FileError,
FileSystemError: extHostTypes.FileSystemError,
FoldingRange: extHostTypes.FoldingRange,
FoldingRangeKind: extHostTypes.FoldingRangeKind
};

View File

@@ -1838,19 +1838,19 @@ export enum FileType2 {
SymbolicLink = 4,
}
export class FileError extends Error {
export class FileSystemError extends Error {
static EntryExists(message?: string): FileError {
return new FileError(message, 'EntryExists', FileError.EntryExists);
static EntryExists(message?: string): FileSystemError {
return new FileSystemError(message, 'EntryExists', FileSystemError.EntryExists);
}
static EntryNotFound(message?: string): FileError {
return new FileError(message, 'EntryNotFound', FileError.EntryNotFound);
static EntryNotFound(message?: string): FileSystemError {
return new FileSystemError(message, 'EntryNotFound', FileSystemError.EntryNotFound);
}
static EntryNotADirectory(message?: string): FileError {
return new FileError(message, 'EntryNotADirectory', FileError.EntryNotADirectory);
static EntryNotADirectory(message?: string): FileSystemError {
return new FileSystemError(message, 'EntryNotADirectory', FileSystemError.EntryNotADirectory);
}
static EntryIsADirectory(message?: string): FileError {
return new FileError(message, 'EntryIsADirectory', FileError.EntryIsADirectory);
static EntryIsADirectory(message?: string): FileSystemError {
return new FileSystemError(message, 'EntryIsADirectory', FileSystemError.EntryIsADirectory);
}
constructor(message?: string, code?: string, hide?: Function) {