webterm_agent/models/
panic_error.rs

1use std::fmt;
2
3// Errors which are ok to crash the agent
4#[derive(Debug)]
5pub enum PanicError {
6    RuntimeError(String),
7    RelayParseError(String),
8}
9
10impl std::error::Error for PanicError {}
11
12impl fmt::Display for PanicError {
13    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14        match self {
15            PanicError::RuntimeError(e) => write!(f, "Runtime error: {}", e),
16            PanicError::RelayParseError(e) => write!(f, "Relay parse error: {}", e),
17        }
18    }
19}