IsFatalError

Trait IsFatalError 

Source
pub trait IsFatalError:
    'static
    + Send
    + Sync
    + Error {
    // Required method
    fn is_fatal(&self) -> bool;
}
Expand description

Determines whether an error should be treated as “fatal”.

Typically, “fatal” errors will abort any currently running commands (e.g. loops, compound commands, pipelines, etc.) all the way to a top level command, and consider it unsuccessful. On the other hand, non-fatal errors are usually swallowed by intermediate commands, and the execution is allowed to continue.

Ultimately it is up to the caller to decide how to handle fatal vs non-fatal errors.

Required Methods§

Source

fn is_fatal(&self) -> bool

Checks whether the error should be considered a “fatal” error.

Implementations on Foreign Types§

Source§

impl IsFatalError for Void

Source§

fn is_fatal(&self) -> bool

Implementors§