diff --git a/libimaglink/src/error.rs b/libimaglink/src/error.rs index 12be1366..32c5a72b 100644 --- a/libimaglink/src/error.rs +++ b/libimaglink/src/error.rs @@ -6,11 +6,21 @@ use std::fmt; #[derive(Clone, Copy, Debug, PartialEq)] pub enum LinkErrorKind { + EntryHeaderReadError, + EntryHeaderWriteError, + ExistingLinkTypeWrong, } fn link_error_type_as_str(e: &LinkErrorKind) -> &'static str { match e { - _ => unimplemented!(), + &LinkErrorKind::EntryHeaderReadError + => "Error while reading an entry header", + + &LinkErrorKind::EntryHeaderWriteError + => "Error while writing an entry header", + + &LinkErrorKind::ExistingLinkTypeWrong + => "Existing link entry has wrong type", } }