(reason: unknown)
| 437 | } |
| 438 | |
| 439 | const onUnhandledRejection = (reason: unknown) => { |
| 440 | if ( |
| 441 | isExpectedControlFlowError(reason, { |
| 442 | stdinStreamMode: useStdinPromptStream, |
| 443 | shuttingDown: isShuttingDown, |
| 444 | operation: "runtime", |
| 445 | }) |
| 446 | ) { |
| 447 | return |
| 448 | } |
| 449 | |
| 450 | const error = normalizeError(reason) |
| 451 | emitRuntimeError(error, "unhandledRejection") |
| 452 | |
| 453 | if (signalOnlyExit) { |
| 454 | return |
| 455 | } |
| 456 | |
| 457 | void shutdown("unhandledRejection", 1) |
| 458 | } |
| 459 | |
| 460 | const parkUntilSignal = async (reason: string): Promise<never> => { |
| 461 | ensureKeepAliveInterval() |
nothing calls this directly
no test coverage detected