use etherdream::EtherdreamError;
use std::error::Error;
use std::fmt::Display;
use std::fmt::Formatter;
use std::fmt::Result;
#[derive(Debug)]
pub enum LaseError {
EtherdreamError {
cause: EtherdreamError
},
UnsupportedByDac,
}
impl Error for LaseError {
fn description(&self) -> &str {
match *self {
LaseError::EtherdreamError { .. } => "EtherdreamError",
LaseError::UnsupportedByDac => "UnsupportedByDac",
}
}
}
impl Display for LaseError {
fn fmt(&self, f: &mut Formatter) -> Result {
write!(f, "{}", self.description())
}
}
impl From<EtherdreamError> for LaseError {
fn from(error: EtherdreamError) -> Self {
LaseError::EtherdreamError { cause: error }
}
}