Add new error type for low-level file system errors
This commit is contained in:
parent
78701c7332
commit
bcebe86546
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,7 @@ use std::io::Error as IOError;
|
|||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum StoreErrorKind {
|
||||
FileError,
|
||||
IdLocked,
|
||||
IdNotFound,
|
||||
OutOfMemory,
|
||||
|
@ -18,6 +19,7 @@ pub enum StoreErrorKind {
|
|||
|
||||
fn store_error_type_as_str(e: &StoreErrorKind) -> &'static str {
|
||||
match e {
|
||||
&StoreErrorKind::FileError => "File Error",
|
||||
&StoreErrorKind::IdLocked => "ID locked",
|
||||
&StoreErrorKind::IdNotFound => "ID not found",
|
||||
&StoreErrorKind::OutOfMemory => "Out of Memory",
|
||||
|
|
Loading…
Reference in a new issue