mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
error: imple Error for EthFailed
This commit is contained in:
11
src/error.rs
11
src/error.rs
@@ -55,6 +55,8 @@ pub enum Error {
|
||||
BtcFailed(String),
|
||||
#[cfg(feature = "sol")]
|
||||
SolFailed(String),
|
||||
#[cfg(feature = "eth")]
|
||||
EthFailed(String),
|
||||
BridgeError(String),
|
||||
ZmqError(String),
|
||||
|
||||
@@ -133,6 +135,8 @@ impl fmt::Display for Error {
|
||||
Error::BtcFailed(ref err) => write!(f, "Btc client failed: {}", err),
|
||||
#[cfg(feature = "sol")]
|
||||
Error::SolFailed(ref err) => write!(f, "Sol client failed: {}", err),
|
||||
#[cfg(feature = "eth")]
|
||||
Error::EthFailed(ref err) => write!(f, "Eth client failed: {}", err),
|
||||
Error::TryIntoError => f.write_str("TryInto error"),
|
||||
Error::TryFromError => f.write_str("TryFrom error"),
|
||||
Error::TryFromBigIntError => f.write_str("TryFromBigInt error"),
|
||||
@@ -299,6 +303,13 @@ impl From<crate::service::SolFailed> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "eth")]
|
||||
impl From<crate::service::EthFailed> for Error {
|
||||
fn from(err: crate::service::EthFailed) -> Error {
|
||||
Error::EthFailed(err.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<toml::de::Error> for Error {
|
||||
fn from(err: toml::de::Error) -> Error {
|
||||
Error::TomlDeserializeError(err.to_string())
|
||||
|
||||
Reference in New Issue
Block a user