This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Epiphany/epiphany-codex-bridge/src/error.rs
2026-05-19 15:38:31 +01:00

20 lines
500 B
Rust

use std::error::Error;
use std::fmt;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum EpiphanyBridgeError {
InvalidRequest(String),
Fatal(String),
}
pub type Result<T> = std::result::Result<T, EpiphanyBridgeError>;
impl fmt::Display for EpiphanyBridgeError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::InvalidRequest(message) | Self::Fatal(message) => f.write_str(message),
}
}
}
impl Error for EpiphanyBridgeError {}