From b0fa3a96b557c7107a6414e47913dc03e84c2d81 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Thu, 14 Nov 2024 12:35:31 +0000 Subject: [PATCH] refactor(blockifier): update native error name --- crates/blockifier/src/execution/errors.rs | 2 +- crates/blockifier/src/execution/native/entry_point_execution.rs | 2 +- crates/blockifier/src/execution/native/syscall_handler.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/blockifier/src/execution/errors.rs b/crates/blockifier/src/execution/errors.rs index 5377f33fe6..ca698a1001 100644 --- a/crates/blockifier/src/execution/errors.rs +++ b/crates/blockifier/src/execution/errors.rs @@ -95,7 +95,7 @@ pub enum EntryPointExecutionError { NativeUnexpectedError(#[from] NativeError), #[cfg(feature = "cairo_native")] #[error(transparent)] - NativeExecutionError(#[from] Box), + NativeUnrecoverableError(#[from] Box), #[error(transparent)] PostExecutionError(#[from] PostExecutionError), #[error(transparent)] diff --git a/crates/blockifier/src/execution/native/entry_point_execution.rs b/crates/blockifier/src/execution/native/entry_point_execution.rs index 3282082f9e..898b5214a6 100644 --- a/crates/blockifier/src/execution/native/entry_point_execution.rs +++ b/crates/blockifier/src/execution/native/entry_point_execution.rs @@ -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) diff --git a/crates/blockifier/src/execution/native/syscall_handler.rs b/crates/blockifier/src/execution/native/syscall_handler.rs index 7573410b5b..ec882a2840 100644 --- a/crates/blockifier/src/execution/native/syscall_handler.rs +++ b/crates/blockifier/src/execution/native/syscall_handler.rs @@ -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, }