MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / to_error_msg

Function to_error_msg

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

Source from the content-addressed store, hash-verified

337}
338
339pub fn to_error_msg(exit_code: ExitCode) -> &'static str {
340 match exit_code {
341 ExitCode::OK => "",
342 ExitCode::SYS_SENDER_INVALID => "The message sender doesn't exist.",
343 ExitCode::SYS_SENDER_STATE_INVALID => "The message sender was not in a valid state to send this message. Either the nonce didn't match, or the sender didn't have funds to cover the message gas.",
344 ExitCode::SYS_ILLEGAL_INSTRUCTION => "The message receiver trapped (panicked).",
345 ExitCode::SYS_INVALID_RECEIVER => "The message receiver doesn't exist and can't be automatically created",
346 ExitCode::SYS_INSUFFICIENT_FUNDS => "The message sender didn't have the requisite funds.",
347 ExitCode::SYS_OUT_OF_GAS => "Message execution (including subcalls) used more gas than the specified limit.",
348 ExitCode::SYS_ILLEGAL_EXIT_CODE => "The message receiver aborted with a reserved exit code.",
349 ExitCode::SYS_ASSERTION_FAILED => "An internal VM assertion failed.",
350 ExitCode::SYS_MISSING_RETURN => "The actor returned a block handle that doesn't exist",
351 ExitCode::USR_ILLEGAL_ARGUMENT => "The method parameters are invalid.",
352 ExitCode::USR_NOT_FOUND => "The requested resource does not exist.",
353 ExitCode::USR_FORBIDDEN => "The requested operation is forbidden.",
354 ExitCode::USR_INSUFFICIENT_FUNDS => "The actor has insufficient funds to perform the requested operation.",
355 ExitCode::USR_ILLEGAL_STATE => "The actor's internal state is invalid.",
356 ExitCode::USR_SERIALIZATION => "There was a de/serialization failure within actor code.",
357 ExitCode::USR_UNHANDLED_MESSAGE => "The message cannot be handled (usually indicates an unhandled method number).",
358 ExitCode::USR_UNSPECIFIED => "The actor failed with an unspecified error.",
359 ExitCode::USR_ASSERTION_FAILED => "The actor failed a user-level assertion.",
360 ExitCode::USR_READ_ONLY => "The requested operation cannot be performed in 'read-only' mode.",
361 ExitCode::USR_NOT_PAYABLE => "The method cannot handle a transfer of value.",
362 _ => ""
363 }
364}
365
366pub fn to_snapshots(
367 snapshots: impl IntoIterator<Item = SnapshotItem>,

Callers 3

to_exec_tx_resultFunction · 0.85
to_check_txFunction · 0.85
to_queryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected