Files
openclaw/src/runtime.test.ts
maweibin 586107002a fix(runtime): throw typed ExitError instead of generic Error for simulated exit (#97796) (#97803)
createNonExitingRuntime.exit() threw a generic Error, making it
impossible for upstream try-catch to distinguish a simulated process
exit from a real runtime crash. Added an ExitError class (internal-only,
not exported from SDK) that callers can check via instanceof.

ExitError is kept internal to avoid expanding the public plugin SDK
API surface without maintainer approval. Tests import directly from
./runtime.js.

Fixes #97796.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 16:07:32 +00:00

2.4 KiB