pub enum Error {
TaskFailure {
task: String,
exit_status: ExitStatus,
},
InvalidTask {
task: String,
reason: String,
},
CouldNotSpawn {
task: String,
source: Error,
},
CouldNotWait {
task: String,
source: Error,
},
CouldNotFindCurrentDirectory {
source: Error,
},
EarlyReturn(Box<dyn Error + Send + Sync + 'static>),
PoisonedLog {
task: String,
},
}
Expand description
The possible errors reported by a ShellTask
.
Variants§
TaskFailure
This error occurs when a command exits with a status other than 0.
InvalidTask
This error occurs when a task could not be instantiated because it was malformed. This is a usage error, make sure you’ve typed the command correctly.
CouldNotSpawn
This error occurs when a task could not spawn. Originates from std::process::Command::spawn
.
Fields
source: Error
The io::Error
that was reported by std::process::Command::spawn
.
CouldNotWait
There was an error waiting for the task status. Originates from std::process::Child::wait
.
Fields
source: Error
The io::Error
that was reported by std::process::Child::wait
.
CouldNotFindCurrentDirectory
This error is returned when the current directory cannot be found. Originates from std::env::current_dir
.
Fields
source: Error
The io::Error
that was reported by std::env::current_dir
.
EarlyReturn(Box<dyn Error + Send + Sync + 'static>)
This error can be returned from log handlers to terminate early.
PoisonedLog
This error is returned when the log lock is poisoned.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more