Skip to content

Commit

Permalink
refactor(blockifier): update native error name
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-pino committed Nov 14, 2024
1 parent eedebd0 commit b0fa3a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub enum EntryPointExecutionError {
NativeUnexpectedError(#[from] NativeError),
#[cfg(feature = "cairo_native")]
#[error(transparent)]
NativeExecutionError(#[from] Box<SyscallExecutionError>),
NativeUnrecoverableError(#[from] Box<SyscallExecutionError>),
#[error(transparent)]
PostExecutionError(#[from] PostExecutionError),
#[error(transparent)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn execute_entry_point_call(
let call_result = execution_result.map_err(EntryPointExecutionError::NativeUnexpectedError)?;

if let Some(error) = syscall_handler.unrecoverable_error {
return Err(EntryPointExecutionError::NativeExecutionError(Box::new(error)));
return Err(EntryPointExecutionError::NativeUnrecoverableError(Box::new(error)));
}

create_callinfo(call_result, syscall_handler)
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/native/syscall_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl<'state> NativeSyscallHandler<'state> {
fn unwrap_native_error(error: SyscallExecutionError) -> SyscallExecutionError {
match error {
SyscallExecutionError::EntryPointExecutionError(
EntryPointExecutionError::NativeExecutionError(e),
EntryPointExecutionError::NativeUnrecoverableError(e),
) => *e,
_ => error,
}
Expand Down

0 comments on commit b0fa3a9

Please sign in to comment.