1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
use std::error::Error;
use std::fmt::{Display, Formatter, Error as FmtError};


#[derive(Debug)]
pub enum PoolError {
    PollError,
}


impl Error for PoolError {
    fn description(&self) -> &str {
        "PoolError Occurred"
    }
}

impl Display for PoolError {
    fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
        write!(f, "{}", self.description())
    }
}