Skip to content

Commit

Permalink
Merge pull request #1125 from 0xPolygonMiden/frisitano-event-vault-delta
Browse files Browse the repository at this point in the history
Introduce `EventError`
  • Loading branch information
bobbinth authored Oct 30, 2023
2 parents 40229e3 + c9bf522 commit 20054cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion processor/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ use super::{
CodeBlock, Digest, Felt, QuadFelt, Word,
};
use core::fmt::{Display, Formatter};
use vm_core::{stack::STACK_TOP_SIZE, utils::to_hex};
use vm_core::{
stack::STACK_TOP_SIZE,
utils::{string::String, to_hex},
};
use winter_prover::{math::FieldElement, ProverError};

#[cfg(feature = "std")]
Expand All @@ -23,6 +26,7 @@ pub enum ExecutionError {
DynamicCodeBlockNotFound(Digest),
CycleLimitExceeded(u32),
DivideByZero(u32),
EventError(String),
Ext2InttError(Ext2InttError),
FailedAssertion(u32, Felt),
InvalidFmpValue(Felt, Felt),
Expand Down Expand Up @@ -84,6 +88,7 @@ impl Display for ExecutionError {
write!(f, "Exceeded the allowed number of cycles (max cycles = {max_cycles})")
}
DivideByZero(clk) => write!(f, "Division by zero at clock cycle {clk}"),
EventError(error) => write!(f, "Failed to process event - {error}"),
Ext2InttError(err) => write!(f, "Failed to execute Ext2Intt operation: {err}"),
FailedAssertion(clk, err_code) => {
write!(f, "Assertion failed at clock cycle {clk} with error code {err_code}")
Expand Down

0 comments on commit 20054cb

Please sign in to comment.