odradev / odra

Odra framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make errors better

kubaplas opened this issue · comments

Currently, we are catching complex errors from execution or vm and returning Odra's simplified version.
For example in get_dictionary_value all serialization errors are mapped to Formatting.

Add all possible errors to odra errors, so when deserialize errors out it spews out OdraError(ExecutionError(DeserializationError(LeftOverBytes)))

Moreover, instead of copying errors into Odra, reuse them. Last error from above example should really be casper_types::bytes_repr::Error::LeftoverBytes