Add more error types for header walking

This commit is contained in:
Matthias Beyer 2016-02-04 12:23:28 +01:00
parent 0727fca797
commit a2e3598c01

View file

@ -25,6 +25,8 @@ pub enum StoreErrorKind {
EntryAlreadyExists, EntryAlreadyExists,
MalformedEntry, MalformedEntry,
HeaderPathSyntaxError, HeaderPathSyntaxError,
HeaderPathTypeFailure,
HeaderKeyNotFound,
// maybe more // maybe more
} }
@ -46,6 +48,8 @@ fn store_error_type_as_str(e: &StoreErrorKind) -> &'static str {
&StoreErrorKind::EntryAlreadyExists => "Entry already exists", &StoreErrorKind::EntryAlreadyExists => "Entry already exists",
&StoreErrorKind::MalformedEntry => "Entry has invalid formatting, missing header", &StoreErrorKind::MalformedEntry => "Entry has invalid formatting, missing header",
&StoreErrorKind::HeaderPathSyntaxError => "Syntax error in accessor string", &StoreErrorKind::HeaderPathSyntaxError => "Syntax error in accessor string",
&StoreErrorKind::HeaderPathTypeFailure => "Header has wrong type for path",
&StoreErrorKind::HeaderKeyNotFound => "Header Key not found",
} }
} }