referrerpolicy=no-referrer-when-downgrade

Macro frame_support::pallet_prelude::defensive_assert

source ·
macro_rules! defensive_assert {
    ($cond:expr $(, $proof:expr )? $(,)?) => { ... };
}
Expand description

Trigger a defensive failure if a condition is not met.

Similar to assert! but will print an error without debug_assertions instead of silently ignoring it. Only accepts one instead of variable formatting arguments.

§Example

frame_support::defensive_assert!(1 == 0, "Must fail")