pforge_config/
error.rs

1use std::path::PathBuf;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum ConfigError {
6    #[error("IO error reading {0}: {1}")]
7    IoError(PathBuf, #[source] std::io::Error),
8
9    #[error("Parse error: {0}")]
10    ParseError(String),
11
12    #[error("Duplicate tool name: {0}")]
13    DuplicateToolName(String),
14
15    #[error("Invalid handler path: {0}")]
16    InvalidHandlerPath(String),
17
18    #[error("Validation error: {0}")]
19    ValidationError(String),
20}
21
22pub type Result<T> = std::result::Result<T, ConfigError>;