Skip to main content

panic

Macro panic 

Source
macro_rules! panic {
    ($format_string:literal $(,)?) => { ... };
    ($format_string:literal, $($args:expr),* $(,)?) => { ... };
}
Expand description

Panics unconditionally.

This macro logs a panic banner and the formatted message at FATAL level using pw_log, and then calls the crash handler pw_assert_HandleFailure.

ยงExamples

pw_assert::panic!("Something went terribly wrong!");

pw_assert::panic!("Error code: {}", 42 as i32);