mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
debt - move error handler code
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user