Enum shell_candy::Error

source ·
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

Fields

task: String

The task that failed.

exit_status: ExitStatus

The exit status that was returned.

This error occurs when a command exits with a status other than 0.

InvalidTask

Fields

task: String

The malformed task.

reason: String

The reason the task was malformed.

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

Fields

task: String

The task that could not spawn.

source: Error

The io::Error that was reported by std::process::Command::spawn.

This error occurs when a task could not spawn. Originates from std::process::Command::spawn.

CouldNotWait

Fields

task: String

The task that could not be waited for.

source: Error

The io::Error that was reported by std::process::Child::wait.

There was an error waiting for the task status. Originates from std::process::Child::wait.

CouldNotFindCurrentDirectory

Fields

source: Error

The io::Error that was reported by std::env::current_dir.

This error is returned when the current directory cannot be found. Originates from std::env::current_dir.

EarlyReturn(Box<dyn Error + Send + Sync + 'static>)

This error can be returned from log handlers to terminate early.

PoisonedLog

Fields

task: String

The task that encountered an unrecoverable error

This error is returned when the log lock is poisoned.

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.