1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt;

use crate::error::{Error, ErrorKind};
use crate::result::ExecutionFailure;

impl From<ExecutionFailure> for Error {
    fn from(error: ExecutionFailure) -> Self {
        ErrorKind::Execution.detailed(error)
    }
}

impl std::error::Error for ExecutionFailure {}

impl fmt::Display for ExecutionFailure {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.value)
    }
}