mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
show errors and messages in output (#4031)
This commit is contained in:
@@ -40,8 +40,12 @@ export function getData(output: nb.ICellOutput): JSONObject {
|
||||
}
|
||||
} else if (nbformat.isError(output)) {
|
||||
let traceback = output.traceback ? output.traceback.join('\n') : undefined;
|
||||
bundle['application/vnd.jupyter.stderr'] =
|
||||
traceback || `${output.ename}: ${output.evalue}`;
|
||||
bundle['application/vnd.jupyter.stderr'] = undefined;
|
||||
if (traceback && traceback !== '') {
|
||||
bundle['application/vnd.jupyter.stderr'] = traceback;
|
||||
} else if (output.evalue) {
|
||||
bundle['application/vnd.jupyter.stderr'] = output.ename && output.ename !== '' ? `${output.ename}: ${output.evalue}` : `${output.evalue}`;
|
||||
}
|
||||
}
|
||||
return convertBundle(bundle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user