tycho_executor/error.rs
1/// Execution result.
2pub type TxResult<T, E = TxError> = ::core::result::Result<T, E>;
3
4/// Execution error.
5#[derive(Debug, thiserror::Error)]
6pub enum TxError {
7 #[error("transaction skipped")]
8 Skipped,
9 #[error("fatal error")]
10 Fatal(#[from] anyhow::Error),
11}
12
13impl From<tycho_types::error::Error> for TxError {
14 #[inline]
15 fn from(value: tycho_types::error::Error) -> Self {
16 Self::Fatal(anyhow::Error::from(value))
17 }
18}