To propagate backtrace properly with thiserror we require two features to land in stable.
rust-lang/rust#99301
rust-lang/rust#96024
We encounter this issue as we start removing old error-chain errors and replacing them with thiserror impls. Once both are available we can write errors as such:
use thiserror::Error;
#[derive(Error, Debug)
pub enum CoolError {
IoError {
#[backtrace]
source: std::io::Error,
}
}
Which will automatically fetch errors from the provide member.