src/vs/code/electron-main/app.ts/CodeApplication/handleSharedProcessErrors
class CodeApplication:	private handleSharedProcessErrors(telemetryService: ITelemetryService, sharedProcess: SharedProcess): void {
		let willShutdown = false;
		once(this.lifecycleMainService.onWillShutdown)(() => willShutdown = true);

		this._register(sharedProcess.onDidError(({ type, details }) => {

			// Logging
			let message: string;
			switch (type) {
				case WindowError.UNRESPONSIVE:
					message = 'SharedProcess: detected unresponsive window';
					break;
				case WindowError.PROCESS_GONE:
					message = `SharedProcess: renderer process gone (detail: ${details?.reason ?? '<unknown>'}, code: ${details?.exitCode ?? '<unknown>'})`;
					break;
				case WindowError.LOAD:
					message = `SharedProcess: failed to load (detail: ${details?.reason ?? '<unknown>'}, code: ${details?.exitCode ?? '<unknown>'})`;
					break;
			}
			onUnexpectedError(new Error(message));

			// Telemetry
			type SharedProcessErrorClassification = {
				type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The type of shared process crash to understand the nature of the crash better.' };
				reason: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The type of shared process crash to understand the nature of the crash better.' };
				code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The type of shared process crash to understand the nature of the crash better.' };
				visible: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'Whether shared process window was visible or not.' };
				shuttingdown: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'Whether the application is shutting down when the crash happens.' };
				owner: 'bpasero';
				comment: 'Event which fires whenever an error occurs in the shared process';

			};
			type SharedProcessErrorEvent = {
				type: WindowError;
				reason: string | undefined;
				code: number | undefined;
				visible: boolean;
				shuttingdown: boolean;
			};
			telemetryService.publicLog2<SharedProcessErrorEvent, SharedProcessErrorClassification>('sharedprocesserror', {
				type,
				reason: details?.reason,
				code: details?.exitCode,
				visible: sharedProcess.isVisible(),
				shuttingdown: willShutdown
			});
		}));
	}