Add error kind for config errors

This commit is contained in:
Matthias Beyer 2016-03-05 11:36:29 +01:00
parent 9e8ef57f72
commit a771db9ea4

View file

@ -10,6 +10,7 @@ use std::convert::From;
*/ */
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq)]
pub enum StoreErrorKind { pub enum StoreErrorKind {
ConfigurationError,
FileError, FileError,
IdLocked, IdLocked,
IdNotFound, IdNotFound,
@ -36,6 +37,7 @@ pub enum StoreErrorKind {
fn store_error_type_as_str(e: &StoreErrorKind) -> &'static str { fn store_error_type_as_str(e: &StoreErrorKind) -> &'static str {
match e { match e {
&StoreErrorKind::ConfigurationError => "Store Configuration Error",
&StoreErrorKind::FileError => "File Error", &StoreErrorKind::FileError => "File Error",
&StoreErrorKind::IdLocked => "ID locked", &StoreErrorKind::IdLocked => "ID locked",
&StoreErrorKind::IdNotFound => "ID not found", &StoreErrorKind::IdNotFound => "ID not found",