1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use polkadot_node_subsystem::SubsystemError;
pub(crate) use polkadot_overseer::OverseerError;
#[fatality::fatality(splitable)]
pub(crate) enum Error {
/// Received error from overseer:
#[fatal]
#[error(transparent)]
SubsystemError(#[from] SubsystemError),
/// The stream of incoming events concluded.
#[fatal]
#[error("Event stream closed unexpectedly")]
EventStreamConcluded,
}
impl From<OverseerError> for Error {
fn from(e: OverseerError) -> Self {
Error::SubsystemError(SubsystemError::from(e))
}
}