Add new error variants
This commit is contained in:
parent
bb9bfd3b62
commit
4bcb78164d
@ -2,7 +2,8 @@
|
||||
pub enum ServiceError {
|
||||
NoPermission,
|
||||
AlreadyStarted,
|
||||
AlreadyStopped
|
||||
AlreadyStopped,
|
||||
IOError(std::io::Error)
|
||||
}
|
||||
|
||||
impl core::fmt::Display for ServiceError {
|
||||
@ -10,7 +11,8 @@ impl core::fmt::Display for ServiceError {
|
||||
match self {
|
||||
Self::NoPermission => write!(f, "no permission"),
|
||||
Self::AlreadyStarted => write!(f, "already started"),
|
||||
Self::AlreadyStopped => write!(f, "already stopped")
|
||||
Self::AlreadyStopped => write!(f, "already stopped"),
|
||||
Self::IOError(err) => write!(f, "IO error ({})", err)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user