Function panic_control::enable_hook_in_current_thread [] [src]

pub fn enable_hook_in_current_thread()

Enables the panic hook for the current thread.

If the panic hook has been disabled for the current thread with disable_hook_in_current_thread(), calling this function enables it back.

This function does not allocate resources when called repeatedly in the same thread, and it can be used in any order together with other functions and methods of this crate that modify the panic hook.

Caveats

Other code within the program that modifies the panic hook, concurrently to, or after, a call to this function, may cause the hook chain to stop working as intended. This function interoperates only with the other functions and methods of this crate that modify the panic hook. Libraries other than those designed for test purposes should avoid using this function.