thulp_skill_files/
error.rs1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, SkillFileError>;
7
8#[derive(Debug, Error)]
10pub enum SkillFileError {
11 #[error("IO error: {0}")]
13 Io(#[from] std::io::Error),
14
15 #[error("YAML parsing error: {0}")]
17 Yaml(#[from] serde_yaml::Error),
18
19 #[error("Parse error: {0}")]
21 Parse(String),
22
23 #[error("Invalid path: {0}")]
25 InvalidPath(String),
26
27 #[error("Command execution error: {0}")]
29 CommandExecution(String),
30
31 #[error("Variable not found: {0}")]
33 VariableNotFound(String),
34
35 #[error("Skill not found: {0}")]
37 SkillNotFound(String),
38
39 #[error("Tool not allowed: {0}")]
41 ToolNotAllowed(String),
42
43 #[error("Approval required for skill: {0}")]
45 ApprovalRequired(String),
46
47 #[error("Regex error: {0}")]
49 Regex(#[from] regex::Error),
50}