pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
235 stars 24 forks source link

Log general anyhow errors better #76

Closed SomeoneToIgnore closed 1 year ago

SomeoneToIgnore commented 1 year ago

See https://docs.rs/anyhow/latest/anyhow/struct.Error.html#display-representations

Use {e:#} instead of {e} in global error printers to print the entire chain of anyhow contexts that lead to error. Previous version printed the topmost context only, making it hard to debug errors.

We could also use {e:?} to print any backtraces associated, but that seems like an overkill since will produce vast logs in the playdate console.