src/vs/workbench/contrib/notebook/browser/view/output/transforms/richTransform.ts/JSErrorRendererContrib/render
class JSErrorRendererContrib:	render(_output: ICellOutputViewModel, item: IOutputItemDto, container: HTMLElement, _notebookUri: URI): IRenderOutput {
		const linkDetector = this._instantiationService.createInstance(LinkDetector);

		type ErrorLike = Partial<Error>;


		let err: ErrorLike;
		try {
			err = <ErrorLike>JSON.parse(getStringValue(item));
		} catch (e) {
			this._logService.warn('INVALID output item (failed to parse)', e);
			return { type: RenderOutputType.Mainframe };
		}

		const header = document.createElement('div');
		const headerMessage = err.name && err.message ? `${err.name}: ${err.message}` : err.name || err.message;
		if (headerMessage) {
			header.innerText = headerMessage;
			container.appendChild(header);
		}
		const stack = document.createElement('pre');
		stack.classList.add('traceback');
		if (err.stack) {
			stack.appendChild(handleANSIOutput(err.stack, linkDetector, this._themeService, undefined));
		}
		container.appendChild(stack);
		container.classList.add('error');

		return { type: RenderOutputType.Mainframe };
	}