Add error module

This commit is contained in:
Matthias Beyer 2016-04-17 16:37:48 +02:00
parent 735fcc93c5
commit fa370facf3

16
libimagdiary/src/error.rs Normal file
View file

@ -0,0 +1,16 @@
generate_error_module!(
generate_error_types!(DiaryError, DiaryErrorKind,
StoreWriteError => "Error writing store",
StoreReadError => "Error reading store",
CannotFindDiary => "Cannot find diary",
CannotCreateNote => "Cannot create Note object for diary entry",
DiaryEditError => "Cannot edit diary entry",
PathConversionError => "Error while converting paths internally",
EntryNotInDiary => "Entry not in Diary",
IOError => "IO Error"
);
);
pub use self::error::DiaryError;
pub use self::error::DiaryErrorKind;