Files
hakorune/src
tomoaki 3aba574723 refactor(llvm): Phase 286B - Unify error handling with Result<T, LlvmRunError>
This refactoring consolidates 20+ duplicated error handling patterns in LLVM mode
into a unified Result-based error handling system.

New files:
- error.rs: LlvmRunError type with code, msg, and convenience constructors
- report.rs: emit_error_and_exit() - single exit point for all LLVM errors

Changes:
- harness_executor.rs: Returns Result<i32, LlvmRunError> instead of Option<i32>
- pyvm_executor.rs: Returns Result<i32, LlvmRunError> instead of Option<i32>
- fallback_executor.rs: Returns Result<i32, LlvmRunError> instead of i32
- mod.rs: Updated all error handling to use report::emit_error_and_exit()

Benefits:
1. Unified error handling with Result<T, LlvmRunError>
2. Clear separation: Executors return errors, orchestrator handles exit
3. Single exit point guarantees leak report consistency
4. Reduced code duplication (20+ patterns consolidated)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-24 11:10:57 +09:00
..