mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 19:37:56 +00:00
Simplified code using existing APIs (#11702)
Signed-off-by: Emison Lu <lzh1633856298@gmail.com>
This commit is contained in:
@@ -145,11 +145,7 @@ impl<'a> sp_wasm_interface::FunctionContext for HostContext<'a> {
|
||||
}
|
||||
|
||||
fn register_panic_error_message(&mut self, message: &str) {
|
||||
self.caller
|
||||
.data_mut()
|
||||
.host_state_mut()
|
||||
.expect("host state is not empty when calling a function in wasm; qed")
|
||||
.panic_message = Some(message.to_owned());
|
||||
self.host_state_mut().panic_message = Some(message.to_owned());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user