MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / extract_panic_message

Function extract_panic_message

ciphercore-utils/src/execute_main.rs:28–36  ·  view source on GitHub ↗
(e: Box<dyn std::any::Any + Send>)

Source from the content-addressed store, hash-verified

26
27#[doc(hidden)]
28pub fn extract_panic_message(e: Box<dyn std::any::Any + Send>) -> Option<String> {
29 match e.downcast::<String>() {
30 Ok(panic_msg) => Some(*panic_msg),
31 Err(e) => match e.downcast::<&str>() {
32 Ok(panic_msg) => Some((*panic_msg).to_owned()),
33 Err(_) => None,
34 },
35 }
36}
37
38#[doc(hidden)]
39pub fn process_result<R>(result: std::thread::Result<R>) {

Callers 2

process_resultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected