Skip to main content

xchecker_runner/
error.rs

1//! Error types for runner module
2
3use thiserror::Error;
4
5/// Runner execution errors for cross-platform Claude CLI execution
6#[derive(Error, Debug)]
7pub enum RunnerError {
8    #[error("Runner detection failed: {reason}")]
9    DetectionFailed { reason: String },
10
11    #[error("WSL not available: {reason}")]
12    WslNotAvailable { reason: String },
13
14    #[error("WSL execution failed: {reason}")]
15    WslExecutionFailed { reason: String },
16
17    #[error("Native execution failed: {reason}")]
18    NativeExecutionFailed { reason: String },
19
20    #[error("Runner configuration invalid: {reason}")]
21    ConfigurationInvalid { reason: String },
22
23    #[error("Claude CLI not found in runner environment: {runner}")]
24    ClaudeNotFoundInRunner { runner: String },
25
26    #[error("Execution timed out after {timeout_seconds} seconds")]
27    Timeout { timeout_seconds: u64 },
28}