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

Function onUncaughtException

apps/cli/src/commands/cli/run.ts:419–437  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

417 }
418
419 const onUncaughtException = (error: Error) => {
420 if (
421 isExpectedControlFlowError(error, {
422 stdinStreamMode: useStdinPromptStream,
423 shuttingDown: isShuttingDown,
424 operation: "runtime",
425 })
426 ) {
427 return
428 }
429
430 emitRuntimeError(error, "uncaughtException")
431
432 if (signalOnlyExit) {
433 return
434 }
435
436 void shutdown("uncaughtException", 1)
437 }
438
439 const onUnhandledRejection = (reason: unknown) => {
440 if (

Callers

nothing calls this directly

Calls 3

emitRuntimeErrorFunction · 0.85
shutdownFunction · 0.70

Tested by

no test coverage detected