ontocore_robot/error.rs
1use 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("{0}")]
15 Run(String),
16}
17
18pub type Result<T> = std::result::Result<T, RobotError>;