Allow boxed stderrors created from anyhow::Error to be downcast to the original type.#412
Allow boxed stderrors created from anyhow::Error to be downcast to the original type.#412afranchuk wants to merge 1 commit into
Conversation
original type. Closes dtolnay#379.
dtolnay
left a comment
There was a problem hiding this comment.
Thanks for the PR. I don't think this is necessarily better. This means if you take anyhow::Error with a backtrace, and convert it to Box<dyn Error>, the resulting error loses the backtrace.
|
That's a fair point. Maybe it would work to make the source of Unfortunately that change may break existing code, though. But on the other hand you could also make that behavior only occur when it's converted to a boxed error to limit the extent of the change in behavior. |
Closes #379.