MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / handleExecuteSilentErrors

Function handleExecuteSilentErrors

src/kernels/helpers.ts:826–852  ·  view source on GitHub ↗
(
    outputs: nbformat.IOutput[],
    errorOptions: SilentExecutionErrorOptions,
    codeForLogging: string
)

Source from the content-addressed store, hash-verified

824}
825
826function handleExecuteSilentErrors(
827 outputs: nbformat.IOutput[],
828 errorOptions: SilentExecutionErrorOptions,
829 codeForLogging: string
830) {
831 outputs
832 .filter((output) => {
833 return output.output_type === 'error';
834 })
835 .forEach((outputError) => {
836 const errorOutput = outputError as nbformat.IError;
837 const outputMessage = `${errorOutput.ename}: ${errorOutput.evalue} \n ${errorOutput.traceback
838 .map((line) => ` ${line}`)
839 .join('\n')}`;
840 const fullMessage = `${errorOptions.traceErrorsMessage || ''} ${codeForLogging} ${outputMessage}`;
841 if (errorOptions.traceErrors) {
842 logger.error(fullMessage);
843 } else {
844 logger.warn(fullMessage);
845 }
846
847 // Send telemetry if requested, no traceback for PII
848 if (errorOptions.telemetryName) {
849 sendTelemetryEvent(errorOptions.telemetryName);
850 }
851 });
852}

Callers 1

executeSilentlyFunction · 0.85

Calls 7

sendTelemetryEventFunction · 0.90
filterMethod · 0.80
joinMethod · 0.80
mapMethod · 0.80
errorMethod · 0.65
warnMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected