Skip to content

Commit

Permalink
enhance error handling and refactor expression evaluation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
vagetman committed Dec 15, 2024
1 parent d4ca54d commit 8bd404b
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 238 deletions.
4 changes: 4 additions & 0 deletions esi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ pub enum ExecutionError {
/// An error occurred while creating a regular expression in an eval context
#[error("failed to create a regular expression")]
RegexError(#[from] regex::Error),

/// An error occurred while creating a regular expression in an eval context
#[error("failed to execute a function: `{0}`")]
FunctionError(String),
}

pub type Result<T> = std::result::Result<T, ExecutionError>;
Loading

0 comments on commit 8bd404b

Please sign in to comment.