未验证 提交 74d4b334 编写于 作者: R rebornix

fix #131823.

上级 c6d45158
......@@ -135,18 +135,20 @@ class JSErrorRendererContrib implements IOutputRendererContribution {
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) {
const stack = document.createElement('pre');
stack.classList.add('traceback');
stack.appendChild(handleANSIOutput(err.stack, linkDetector, this._themeService, undefined));
container.appendChild(stack);
} else {
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);
}
}
container.appendChild(stack);
container.classList.add('error');
return { type: RenderOutputType.Mainframe };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册