Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/Enhance Error-Handling #49

Open
AdrienChampion opened this issue Apr 21, 2021 · 0 comments
Open

Fix/Enhance Error-Handling #49

AdrienChampion opened this issue Apr 21, 2021 · 0 comments

Comments

@AdrienChampion
Copy link
Member

Hoice's error-handling is based on error-chain and has several issues as far as Hoice is concerned.

The main problem is that error-chain erases errors, i.e. rsmt2's errors become dyn std::error::Error and it is not possible to know what the error is anymore.
(One very bad way is to check their description, but it's way too ugly to consider.)

This becomes bad because in some cases (pre-processing is the main example), it is convenient for hoice to encode the fact that a/some clause(s) are unsat/unknown as an Error. This leads to either contrived error-handling or bad behavior, such as #36.

I think hoice should have its own custom error-handling approach, which is actually not that hard to do. It could even be (mostly) compatible with error-chain's API. This custom approach should allow to

  • chain errors in a similar fashion to error-chain,
  • access the actual root (original) error without any type erasure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant