Skip to main content

fedimint_hbbft/sender_queue/
error.rs

1use std::fmt::Debug;
2use thiserror::Error;
3
4/// Sender queue error variants.
5#[derive(Debug, Error)]
6pub enum Error<E>
7where
8    E: Debug + std::error::Error,
9{
10    /// Failed to apply a function to the managed algorithm.
11    #[error("Function application failure: {0}")]
12    Apply(E),
13    /// Failed to restart `DynamicHoneyBadger` because it had not been removed.
14    #[error("DynamicHoneyBadger was not removed before restarting")]
15    DynamicHoneyBadgerNotRemoved,
16    /// Failed to start a new joining `DynamicHoneyBadger`.
17    #[error("Failed to start a new joining DynamicHoneyBadger: {0}")]
18    DynamicHoneyBadgerNewJoining(E),
19}