strixonomy_robot/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum RobotError {
5 #[error("ROBOT not found on PATH. Install from https://github.com/ontodev/robot/releases")]
6 NotFound,
7
8 #[error("failed to run ROBOT: {0}")]
9 Io(#[from] std::io::Error),
10
11 #[error("ROBOT exited with status {code}: {stderr}")]
12 Failed { code: i32, stderr: String },
13
14 #[error("ROBOT timed out after {0}s")]
15 TimedOut(u64),
16
17 #[error("ROBOT subprocess output exceeded {0} bytes")]
18 OutputTooLarge(usize),
19
20 #[error("{0}")]
21 Run(String),
22}
23
24pub type Result<T> = std::result::Result<T, RobotError>;