hopr_transport_p2p/
errors.rs1use thiserror::Error;
2
3#[derive(Error, Debug, PartialEq)]
5pub enum P2PError {
6 #[error("Failed to notify an external process: {0}")]
7 Notification(String),
8
9 #[error("Heartbeat protocol failure: {0}")]
10 ProtocolHeartbeat(String),
11
12 #[error("Failed on a logical error: {0}")]
13 Logic(String),
14
15 #[error("libp2p failed with: {0}")]
16 Libp2p(String),
17
18 #[error("Failed to process a multiaddress: {0}")]
19 Multiaddress(String),
20}
21
22pub type Result<T> = core::result::Result<T, P2PError>;