Add new error variants
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user