near_primitives_core/
errors.rs

1use borsh::{BorshDeserialize, BorshSerialize};
2use near_schema_checker_lib::ProtocolSchema;
3use std::fmt::{Debug, Display};
4
5#[derive(BorshSerialize, BorshDeserialize, Debug, Clone, PartialEq, Eq, ProtocolSchema)]
6pub struct IntegerOverflowError;
7
8impl Display for IntegerOverflowError {
9    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
10        f.write_str(&format!("{:?}", self))
11    }
12}
13
14impl std::error::Error for IntegerOverflowError {}