From bffdc6a15d0b592048e1346ac366bc99f36ad40a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 20 Apr 2018 10:39:44 +0200 Subject: [PATCH] a bit of error polish, #47475 --- src/vs/workbench/api/node/extHostTypes.ts | 2 +- .../services/files/electron-browser/remoteFileService.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 313a5aa5a36..fd4a26b9784 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1855,7 +1855,7 @@ export class FileSystemError extends Error { constructor(message?: string, code?: string, hide?: Function) { super(message); - this.name = code ? `FileError/${code}` : `FileError`; + this.name = code ? `${code} (FileSystemError)` : `FileSystemError`; if (typeof Error.captureStackTrace === 'function' && typeof hide === 'function') { // nice stack traces diff --git a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts index 254c3c9d18f..90661a63377 100644 --- a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts +++ b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts @@ -204,7 +204,7 @@ export class RemoteFileService extends FileService { if (!(err instanceof Error)) { return undefined; } - let match = /FileError\/(.+)$/.exec(err.name); + let match = /^(.+) \(FileSystemError\)$/.exec(err.name); if (!match) { return undefined; } @@ -219,7 +219,7 @@ export class RemoteFileService extends FileService { case 'EntryExists': case 'EntryNotADirectory': default: - // todo + // todo res = undefined; break; }