From 3cf25881042cfd2f81dd689be9de8847acfac45c Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 16 Feb 2016 20:42:36 +0100 Subject: [PATCH] Add error types for pre/post hooks --- libimagstore/src/error.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libimagstore/src/error.rs b/libimagstore/src/error.rs index 78588cfb..3b4d7ca9 100644 --- a/libimagstore/src/error.rs +++ b/libimagstore/src/error.rs @@ -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", } }