We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c815ce2 commit d7c0e24Copy full SHA for d7c0e24
src/error.rs
@@ -19,3 +19,15 @@ impl From<io::Error> for AgentError {
19
AgentError::IO(e)
20
}
21
22
+
23
+impl std::fmt::Display for AgentError {
24
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
25
+ match self {
26
+ AgentError::User => write!(f, "Agent: User error"),
27
+ AgentError::Proto(proto) => write!(f, "Agent: Protocol error: {}", proto),
28
+ AgentError::IO(error) => write!(f, "Agent: I/O error: {}", error),
29
+ }
30
31
+}
32
33
+impl std::error::Error for AgentError {}
0 commit comments