debt - move error handler code

This commit is contained in:
Johannes Rieken
2016-10-31 16:08:48 +01:00
parent 0457318795
commit 95536e6678
2 changed files with 5 additions and 9 deletions

View File

@@ -55,8 +55,6 @@ export interface IExtensionApiFactory {
*/
export function createApiFactory(initDataConfiguration: IInitConfiguration, initTelemetryInfo: ITelemetryInfo, threadService: IThreadService, extensionService: ExtHostExtensionService, contextService: IWorkspaceContextService): IExtensionApiFactory {
// Addressable instances
const col = new InstanceCollection();
const extHostHeapService = col.define(ExtHostContext.ExtHostHeapService).set<ExtHostHeapService>(new ExtHostHeapService());
@@ -81,12 +79,6 @@ export function createApiFactory(initDataConfiguration: IInitConfiguration, init
const extHostWorkspace = new ExtHostWorkspace(threadService, workspacePath);
const extHostLanguages = new ExtHostLanguages(threadService);
// Error forwarding
const mainThreadErrors = threadService.get(MainContext.MainThreadErrors);
errors.setUnexpectedErrorHandler((err) => {
mainThreadErrors.onUnexpectedExtHostError(errors.transformErrorForSerialization(err));
});
// Register API-ish commands
ExtHostApiCommands.register(extHostCommands);