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

Implement error handling #48

Open
hdvanegasm opened this issue Dec 1, 2023 · 1 comment
Open

Implement error handling #48

hdvanegasm opened this issue Dec 1, 2023 · 1 comment

Comments

@hdvanegasm
Copy link

We need to define the proper error handling for instructions and operations in the components of the virtual machine in an elegant way.

@hdvanegasm hdvanegasm changed the title Implement error handling. Implement error handling Dec 7, 2023
@hdvanegasm
Copy link
Author

hdvanegasm commented Dec 7, 2023

I suggest implementing the error handling as in the repo: https://github.com/nervosnetwork/ckb-vm. There, they use Results for handling errors in the components of the VM (memory, registers, etc.) for operations like loading, storing, creating, and so on. Also, the instructions return Results. The Result handling should be moved to the outer execution.

We can define our own errors as an enum which implements the Error trait in a file errors.rs.

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

No branches or pull requests

1 participant