diff --git a/components/Editor/index.tsx b/components/Editor/index.tsx index 64b8353..0ffb738 100644 --- a/components/Editor/index.tsx +++ b/components/Editor/index.tsx @@ -183,14 +183,17 @@ const Editor = ({ readOnly = false }: Props) => { if (serializedOutput) { addToConsoleLog(`Execution output: ${serializedOutput}`) } + + if (executionState === ProgramExecutionState.Error) { + addToConsoleLog( + 'Runtime error: ' + executionPanicMessage, + LogType.Error, + ) + } } else if (compilationState === ProgramCompilationState.CompilationErr) { addToConsoleLog('Compilation failed', LogType.Error) } - if (executionState === ProgramExecutionState.Error) { - addToConsoleLog('Runtime error: ' + executionPanicMessage, LogType.Error) - } - // Compilation finished, log the API logs, if any for (const apiLogEntry of apiLogs) { let log_type diff --git a/components/Tracer/index.tsx b/components/Tracer/index.tsx index d60f067..8e026cd 100644 --- a/components/Tracer/index.tsx +++ b/components/Tracer/index.tsx @@ -253,7 +253,7 @@ export const Tracer = () => { -