Function gstuff::any_to_str

source ·
pub fn any_to_str<'a>(message: &'a dyn Any) -> Option<&'a str>
Expand description

Useful with panic handlers.

For example:

if let Err (err) = catch_unwind (AssertUnwindSafe (move || { let mut core = tokio_core::reactor::Core::new().expect (“!core”); loop {core.turn (None)} })) {println! (“CORE panic! {:?}”, any_to_str (&*err)); std::process::abort()}