MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / emitRuntimeError

Function emitRuntimeError

apps/cli/src/commands/cli/run.ts:350–361  ·  view source on GitHub ↗
(error: Error, source?: string)

Source from the content-addressed store, hash-verified

348 : null
349
350 const emitRuntimeError = (error: Error, source?: string) => {
351 const errorMessage = source ? `${source}: ${error.message}` : error.message
352
353 if (useJsonOutput) {
354 const errorEvent = { type: "error", id: Date.now(), content: errorMessage }
355 process.stdout.write(JSON.stringify(errorEvent) + "\n")
356 return
357 }
358
359 console.error("[CLI] Error:", errorMessage)
360 console.error(error.stack)
361 }
362
363 const clearKeepAliveInterval = () => {
364 if (!keepAliveInterval) {

Callers 3

onUncaughtExceptionFunction · 0.85
onUnhandledRejectionFunction · 0.85
runFunction · 0.85

Calls 2

writeMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected