MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / to_code

Function to_code

fendermint/app/src/tmconv.rs:306–312  ·  view source on GitHub ↗
(exit_code: ExitCode)

Source from the content-addressed store, hash-verified

304}
305
306pub fn to_code(exit_code: ExitCode) -> Code {
307 if exit_code.is_success() {
308 Code::Ok
309 } else {
310 Code::Err(NonZeroU32::try_from(exit_code.value()).expect("error codes are non-zero"))
311 }
312}
313
314pub fn to_error_msg(exit_code: ExitCode) -> &'static str {
315 match exit_code {

Callers 3

to_deliver_txFunction · 0.85
to_check_txFunction · 0.85
to_queryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected