The native eval CLI discards the thrown exception value and prints only uncaught error. A simple reproduction with the original Craft 0.0.368 macOS arm64 release binary is:
craft --eval 'throw new Error("distinct failure")'It exits 1 with empty stdout and stderr uncaught error, losing the actual message. minimal.zig:runEval calls js_runtime.evalOnce; that helper destroys the context before the CLI can inspect the exception. The engine retains exceptions and Craft's persistent hosting API already exposes an exception handle.
This also obstructs diagnosis of the unchanged long shared-engine fixture in the game replay issue. That fixture's underlying native failure is not yet established; this diagnostic loss is independently reproduced with the one-line throw above.
Acceptance:
- Retain a regression through the actual public native CLI for a distinctive Error message and a thrown primitive.
- Report useful exception details while the owning runtime is alive, preserving the nonzero exit and distinct syntax/throw/unavailable/OOM classifications.
- Do not execute user-defined getters, proxies or
toStringmerely to render a diagnostic. Do not dump the input bundle. - Preserve execution budgets, heap limits and timeouts. Do not shorten the game fixture or reinterpret the failure as a pass.
- Pass owning source checks and normal release verification before adopting the correction downstream.