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

Extensible VirtualMachineError #751

Closed
tdelabro opened this issue Jan 19, 2023 · 3 comments
Closed

Extensible VirtualMachineError #751

tdelabro opened this issue Jan 19, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@tdelabro
Copy link
Contributor

We are using cairo-rs to build a cairo testing suite.
We are extending the VM with custom behaviors using hints (and other stuff).
We would like to be able to have our custom logic return specific custom VirtualMachineError.

Right now the only way to do so is to use the VirtualMachineError::CustomHint(String) variant.
Problem:

  • it only take a String, no custom error types
  • for our "other stuff" that are not hints it's a smell to use something called CustomHint, yet it's the only thing we have now.

Our ideal implementation would be something like this:
VirtualMachineError::Other(Box<dyn Error>) or VirtualMachineError::Other(anyhow::Error) (if you don't mind the dependency)

If the lambdaclass team agrees, we can come up with a PR for this.

@tdelabro tdelabro added the enhancement New feature or request label Jan 19, 2023
@unbalancedparentheses
Copy link
Member

Hey this is great. Let me check with the team but I'm pretty we would love to have this.

@tdelabro
Copy link
Contributor Author

@unbalancedparentheses you got time to talk about it?

@zarboq
Copy link
Contributor

zarboq commented Jan 24, 2023

Hey, I have talked with @tdelabro, I will be working on this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants