MCPcopy
hub / github.com/zgsm-ai/costrict / onUncaughtException

Function onUncaughtException

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

Source from the content-addressed store, hash-verified

524 }
525
526 const onUncaughtException = (error: Error) => {
527 if (
528 isExpectedControlFlowError(error, {
529 stdinStreamMode: useStdinPromptStream,
530 shuttingDown: isShuttingDown,
531 operation: "runtime",
532 })
533 ) {
534 return
535 }
536
537 emitRuntimeError(error, "uncaughtException")
538
539 if (signalOnlyExit) {
540 return
541 }
542
543 void shutdown("uncaughtException", 1)
544 }
545
546 const onUnhandledRejection = (reason: unknown) => {
547 if (

Callers

nothing calls this directly

Calls 3

emitRuntimeErrorFunction · 0.85
shutdownFunction · 0.70

Tested by

no test coverage detected