mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-20 08:01:42 +03:00
fixed take_hook
This commit is contained in:
parent
9ef1b8f73a
commit
ca6ae112ff
@ -70,6 +70,7 @@ fn take_hook(
|
|||||||
output: Result<Result<Value, String>, Box<dyn Any + Send>>,
|
output: Result<Result<Value, String>, Box<dyn Any + Send>>,
|
||||||
panic_buf: Arc<Mutex<Option<String>>>,
|
panic_buf: Arc<Mutex<Option<String>>>,
|
||||||
) -> Result<Result<Value, String>, String> {
|
) -> Result<Result<Value, String>, String> {
|
||||||
|
let _ = panic::take_hook();
|
||||||
output.map_err(|_| panic_buf.lock().unwrap().take().expect("failed to get panic message"))
|
output.map_err(|_| panic_buf.lock().unwrap().take().expect("failed to get panic message"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user