MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / onUncaughtException

Function onUncaughtException

apps/kimi-code/src/cli/run-shell.ts:165–172  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

163 process.exit(exitCode);
164 };
165 const onUncaughtException = (error: unknown): void => {
166 try {
167 log.error('uncaughtException, restoring terminal and exiting', { error: String(error) });
168 } catch {
169 /* ignore */
170 }
171 emergencyExit(1);
172 };
173 const onUnhandledRejection = (reason: unknown): void => {
174 try {
175 log.error('unhandledRejection, restoring terminal and exiting', { reason: String(reason) });

Callers

nothing calls this directly

Calls 2

emergencyExitFunction · 0.85
errorMethod · 0.65

Tested by

no test coverage detected