Capture backtraces earlier

This commit is contained in:
David Tolnay 2019-10-08 01:21:28 -07:00
parent 310dec9efc
commit c06155e5fb
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -300,7 +300,8 @@ where
E: StdError + Send + Sync + 'static, E: StdError + Send + Sync + 'static,
{ {
fn from(error: E) -> Self { fn from(error: E) -> Self {
Error::new(error) let backtrace = backtrace_if_absent!(error);
Error::from_std(error, backtrace)
} }
} }