use std::error;
use std::fmt;
#[derive(Debug)]
pub enum DBError {
GraphError,
IndexDBError,
}
impl fmt::Display for DBError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DBError::GraphError => write!(f, "Unexpected Graph error occured."),
DBError::IndexDBError => write!(f, "Unexpected IndexDB error occured"),
}
}
}
impl error::Error for DBError {}