Path: blob/main/src/vs/workbench/api/browser/mainThreadErrors.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { SerializedError, onUnexpectedError, transformErrorFromSerialization } from '../../../base/common/errors.js';6import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';7import { MainContext, MainThreadErrorsShape } from '../common/extHost.protocol.js';89@extHostNamedCustomer(MainContext.MainThreadErrors)10export class MainThreadErrors implements MainThreadErrorsShape {1112dispose(): void {13//14}1516$onUnexpectedError(err: any | SerializedError): void {17if (err && err.$isError) {18err = transformErrorFromSerialization(err);19}20onUnexpectedError(err);21}22}232425