pub fn take_hook() -> Box<dyn Fn(&PanicInfo<'_>) + Sync + Send + 'static>
Expand description
Unregisters the current panic hook and returns it, registering the default hook in its place.
See also the function set_hook
.
If the default hook is registered it will be returned, but remain registered.
Panics
Panics if called from a panicking thread.
Examples
The following will print “Normal panic”: