use core::fmt;
#[derive(Debug)]
pub enum Error {
StackSlotOutOfBounds,
BlockFuelOutOfBounds,
MemoryIndexOutOfBounds,
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let s = match self {
Self::StackSlotOutOfBounds => "stack slot out of bounds",
Self::BlockFuelOutOfBounds => "block fuel out of bounds",
Self::MemoryIndexOutOfBounds => "memory index out of bounds",
};
f.write_str(s)
}
}
impl core::error::Error for Error {}