Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/api/browser/mainThreadErrors.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { SerializedError, onUnexpectedError, transformErrorFromSerialization } from '../../../base/common/errors.js';
7
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
8
import { MainContext, MainThreadErrorsShape } from '../common/extHost.protocol.js';
9
10
@extHostNamedCustomer(MainContext.MainThreadErrors)
11
export class MainThreadErrors implements MainThreadErrorsShape {
12
13
dispose(): void {
14
//
15
}
16
17
$onUnexpectedError(err: any | SerializedError): void {
18
if (err && err.$isError) {
19
err = transformErrorFromSerialization(err);
20
}
21
onUnexpectedError(err);
22
}
23
}
24
25