Macro tikv_util::safe_panic[][src]

macro_rules! safe_panic {
    () => { ... };
    ($msg:expr) => { ... };
    ($fmt:expr, $($args:tt)+) => { ... };
}

A safe panic macro that prevents double panic.

You probably want to use this macro instead of panic! in a drop method. It checks whether the current thread is unwinding because of panic. If it is, log an error message instead of causing double panic.