candle
candle copied to clipboard
Improve `candle_core::Error` to make it more ergonomic
Currently, our Error type is already useful but could benefit from some of the QoL features which the anyhow crate has.
This PR adds the following:
- Make
Error::msgmore in line withanyhow::Error::msg. Although the type bound changes, this is not a breaking change becausestd::error::Error: Displayalready. - Add the
Contexttrait. Inspired by anyhow's Context trait which allows for.with_contextand.contexton Options and Results. Very useful!