fixed take_hook

This commit is contained in:
0rphon 2022-03-16 13:15:58 -07:00
parent 9ef1b8f73a
commit ca6ae112ff

View File

@ -70,6 +70,7 @@ fn take_hook(
output: Result<Result<Value, String>, Box<dyn Any + Send>>,
panic_buf: Arc<Mutex<Option<String>>>,
) -> Result<Result<Value, String>, String> {
let _ = panic::take_hook();
output.map_err(|_| panic_buf.lock().unwrap().take().expect("failed to get panic message"))
}