A small crate works with thiserror to create errors with contexts, inspired by snafu.
```rust use std::path::{Path, PathBuf}; use thisctx::WithContext; use thiserror::Error;
pub enum Error { #[error("I/O failed '{path}': {source}")] IoFaild { source: std::io::Error, path: PathBuf, }, }
fn loadconfig(path: &Path) -> Result
All tests under tests/*
passed with rustc v1.33
, previous versions may not
compile.
Licensed under either of
at your option.