zkmopro / mopro

Making client-side proving on mobile simple.
https://zkmopro.org
Apache License 2.0
131 stars 35 forks source link

Use `anyhow` crate for error handling #220

Closed chancehudson closed 3 months ago

chancehudson commented 4 months ago

Problem

Right now we use custom error type. In the code we unwrap errors and map them into the custom error type like here. This is inconvenient and leads to lots of extra code.

Details

Use the anyhow crate to propagate errors outward. Unwrap the error and rewrap into a MoproError only at the top level

Acceptance criteria

All MoproError mappings are removed, except for at the top level.