reagent_rs/tools/
errors.rs1#[derive(Debug)]
6pub enum ToolExecutionError {
7 ArgumentParsingError(String),
9 ExecutionFailed(String),
11 ToolNotFound(String),
13}
14
15
16impl std::fmt::Display for ToolExecutionError {
17 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18 match self {
19 ToolExecutionError::ArgumentParsingError(s) => write!(f, "Tool argument parsing error: {s}"),
20 ToolExecutionError::ExecutionFailed(s) => write!(f, "Tool execution failed: {s}"),
21 ToolExecutionError::ToolNotFound(s) => write!(f, "Tool not found: {s}"),
22 }
23 }
24}
25
26impl std::error::Error for ToolExecutionError {}