Open hdvanegasm opened 7 months ago
I suggest implementing the error handling as in the repo: https://github.com/nervosnetwork/ckb-vm. There, they use Result
s 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 Result
s. 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
.
We need to define the proper error handling for instructions and operations in the components of the virtual machine in an elegant way.