You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let payload = panic_info.payload().downcast_ref::<&str>();
The code attempts to downcast to &str but this will return None if the PanicInfo.payload() is a String. For example, consider the following panic:
panic!("this is a {}", "test");
The "Cause" will not be displayed in the "explanation" portion of the dump file as this panic has a payload of type String which is not &str. How do I get the Cause to show when I use a panic such as this? Or does this require a code change to support downcasting to other types such as String?
The text was updated successfully, but these errors were encountered:
human-panic/src/lib.rs
Line 220 in 200e427
The code attempts to downcast to &str but this will return None if the PanicInfo.payload() is a String. For example, consider the following panic:
panic!("this is a {}", "test");
The "Cause" will not be displayed in the "explanation" portion of the dump file as this panic has a payload of type String which is not &str. How do I get the Cause to show when I use a panic such as this? Or does this require a code change to support downcasting to other types such as String?
The text was updated successfully, but these errors were encountered: