Source Code Survey
This page provides a very high level, sometimes "pseudocode", view of error types and related messages as implemented by the NEAR platform.
Errors raised by the NEAR platform are implemented in the following locations in nearcore
:
RuntimeError and subtypes
RuntimeError
Definition
/// Error returned from `Runtime::apply`
pub enum RuntimeError {
/// An unexpected integer overflow occurred. The likely issue is an invalid state or the transition.
UnexpectedIntegerOverflow,
/// An error happened during TX verification and account charging. It's likely the chunk is invalid.
/// and should be challenged.
InvalidTxError(InvalidTxError),
/// Unexpected error which is typically related to the node storage corruption.account
/// That it's possible the input state is invalid or malicious.
StorageError(StorageError),
/// An error happens if `check_balance` fails, which is likely an indication of an invalid state.
BalanceMismatchError(BalanceMismatchError),
}