Skip to content

Commit

Permalink
bubble up errors from workspace add/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored and egamma committed Oct 31, 2017
1 parent 0cd2e15 commit d489818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostC
import { IProgress } from 'vs/platform/progress/common/progress';
import { ISearchResultProvider, ISearchQuery, ISearchComplete, ISearchProgressItem, QueryType, IFileMatch, ISearchService } from 'vs/platform/search/common/search';
import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing';
import { onUnexpectedError } from 'vs/base/common/errors';

@extHostNamedCustomer(MainContext.MainThreadFileSystem)
export class MainThreadFileSystem implements MainThreadFileSystemShape {
Expand Down Expand Up @@ -45,7 +46,7 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
}

$onDidAddFileSystemRoot(uri: URI): void {
this._workspaceEditingService.addFolders([{ uri }], true);
this._workspaceEditingService.addFolders([{ uri }], true).done(null, onUnexpectedError);
}

$onFileSystemChange(handle: number, changes: IFileChange[]): void {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
return TPromise.as(false);
}

return this._workspaceEditingService.addFolders([{ uri, name }]).then(() => true);
return this._workspaceEditingService.addFolders([{ uri, name }], true).then(() => true);
});
}

Expand All @@ -73,7 +73,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
return TPromise.as(false);
}

return this._workspaceEditingService.removeFolders([uri]).then(() => true);
return this._workspaceEditingService.removeFolders([uri], true).then(() => true);
});
}

Expand Down

0 comments on commit d489818

Please sign in to comment.