facebook / winterfell

A STARK prover and verifier for arbitrary computations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Deserializable` should have an associated type error

hackaugusto opened this issue · comments

Currenlty, the Deserializable trait forces the use of DeserializationError. The only viable way of using it downstream is to use UnknownError(String) or InvalidValue(String), which forces the user site to convert the error to a string prematurely. This often means there is less context in the errors after deserialization, specially when the underlying structure failed validation after deserialization.

To improve the error reporting and error handling, the trait should be modified to have an associated type error.