(exit_code: ExitCode)
| 337 | } |
| 338 | |
| 339 | pub 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 | |
| 366 | pub fn to_snapshots( |
| 367 | snapshots: impl IntoIterator<Item = SnapshotItem>, |
no outgoing calls
no test coverage detected