Macro uucore::crash

source ·
macro_rules! crash {
    ($exit_code:expr, $($args:tt)+) => { ... };
}
Expand description

Display an error and std::process::exit

Displays the provided error message using show_error!, then invokes std::process::exit with the provided exit code.

Examples

// outputs <name>: Couldn't apply foo to bar
// and terminates execution
crash!(1, "Couldn't apply {} to {}", "foo", "bar");