Add error module
This commit is contained in:
parent
735fcc93c5
commit
fa370facf3
1 changed files with 16 additions and 0 deletions
16
libimagdiary/src/error.rs
Normal file
16
libimagdiary/src/error.rs
Normal 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;
|
||||
|
Loading…
Reference in a new issue