mxc
mxc copied to clipboard
Ensure MXC never exits non-zero without first printing an error message
Description of the task
Reviewer feedback on PR #493 (thread) noted (explicitly "not for this PR"): MXC should never exit with a non-zero error code without first printing an error message. Solidifying this makes our error handling — and the telemetry derived from it — unambiguous, since MXC.Error on the completion path keys off a non-empty error_message.
Audit the exit / process::exit paths in src/core/wxc/src/main.rs and src/core/lxc/src/main.rs and ensure each non-zero exit emits a diagnostic first. Panics are the known exception (they cannot reliably print before aborting) and are covered by the separate crash-telemetry work.
Additional context
- Deferred from PR #493, review thread r3464343836.
- Related: the panic-hook crash-telemetry issue (#561) covers the panic case.