mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 13:57:58 +00:00
Documentation and small cleanup in panic-handler (#3249)
* Documentation and small cleanup in panic-handler * Apply suggestions from code review Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com>
This commit is contained in:
committed by
Gavin Wood
parent
de02aee156
commit
cb7383b6b6
@@ -34,7 +34,7 @@ fn safe_call<F, U>(f: F) -> Result<U>
|
||||
where F: UnwindSafe + FnOnce() -> U
|
||||
{
|
||||
// Substrate uses custom panic hook that terminates process on panic. Disable termination for the native call.
|
||||
let _guard = panic_handler::AbortGuard::new(false);
|
||||
let _guard = panic_handler::AbortGuard::force_unwind();
|
||||
::std::panic::catch_unwind(f).map_err(|_| Error::Runtime)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user