Skip to content

Conversation

@filipeom
Copy link
Member

@filipeom filipeom commented Nov 20, 2025

Previously, during operator evaluation we would raise generic failures for following three reasons:

  • A theory was unsupported
  • An operator was not supported by a given theory, and
  • A failure in the evaluation of an operator

This would make exception handling difficult for apps that need to gracefully handle failures. For this reason, we refactored the above exceptions to instead raise a Runtime_exception of type runtime_exception_kind.

Additionally, the refactor included:

  • Fixing a couple of bugs when raising the Type_error exception.
  • Adding all the helpers used for value coercion at the top of the file. I think it's more organised this way. Only time will tell.

BREAKING: Exception API changed for the Eval module

@filipeom filipeom requested a review from a team as a code owner November 20, 2025 12:02
@filipeom filipeom force-pushed the filipe/improve-exception-handling branch from 04aae9a to a1f07f8 Compare November 20, 2025 12:03
@filipeom filipeom force-pushed the filipe/improve-exception-handling branch from a1f07f8 to fcd1f8d Compare November 21, 2025 16:07
Previously, during operator evaluation we would raise generic failures
for following three reasons:

- A theory was unsupported
- An operator was not supported by a given theory, and
- A failure in the evaluation of an operator

This would make exception handling difficult for apps that need to
gracefully handle failures. For this reason, we refactored the above
exceptions to instead raise a `Eval_error` of type `error_kind`.

Additionally, the refactor included:

- Fixing a couple of bugs when raising the `Type_error` exception.
- Adding all the helpers used for value coercion at the top of the file.
  I think it's more organised this way. Only time will tell.

BREAKING: Exception API changed for the `Eval` module
@filipeom filipeom force-pushed the filipe/improve-exception-handling branch from fcd1f8d to 84d70a4 Compare November 21, 2025 16:31
@filipeom filipeom merged commit 3c4b348 into main Nov 23, 2025
9 checks passed
@filipeom filipeom deleted the filipe/improve-exception-handling branch November 23, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants