Add error types for pre/post hooks

This commit is contained in:
Matthias Beyer 2016-02-16 20:42:36 +01:00
parent 17b1d6c390
commit 3cf2588104

View file

@ -28,6 +28,8 @@ pub enum StoreErrorKind {
HeaderKeyNotFound,
HeaderTypeFailure,
HookRegisterError,
PreHookExecuteError,
PostHookExecuteError,
// maybe more
}
@ -52,6 +54,8 @@ fn store_error_type_as_str(e: &StoreErrorKind) -> &'static str {
&StoreErrorKind::HeaderKeyNotFound => "Header Key not found",
&StoreErrorKind::HeaderTypeFailure => "Header type is wrong",
&StoreErrorKind::HookRegisterError => "Hook register error",
&StoreErrorKind::PreHookExecuteError => "Pre-Hook execution error",
&StoreErrorKind::PostHookExecuteError => "Post-Hook execution error",
}
}