Do not call description() when displaying the error
This commit is contained in:
parent
986dbad2fd
commit
0ae7b6b387
1 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ fn print_trace_maxdepth(idx: u64, e: &Error, max: u64) -> Option<&Error> {
|
||||||
} else {
|
} else {
|
||||||
write!(stderr(), "\n").ok();
|
write!(stderr(), "\n").ok();
|
||||||
}
|
}
|
||||||
write!(stderr(), "{}: {}", Red.paint(format!("ERROR[{:>4}]", idx)), e.description()).ok();
|
write!(stderr(), "{}: {}", Red.paint(format!("ERROR[{:>4}]", idx)), e).ok();
|
||||||
e.cause()
|
e.cause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ fn count_error_causes(e: &Error) -> u64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_trace_dbg(idx: u64, e: &Error) {
|
fn print_trace_dbg(idx: u64, e: &Error) {
|
||||||
debug!("{}: {}", Red.blink().paint(format!("ERROR[{:>4}]", idx)), e.description());
|
debug!("{}: {}", Red.blink().paint(format!("ERROR[{:>4}]", idx)), e);
|
||||||
if e.cause().is_some() {
|
if e.cause().is_some() {
|
||||||
e.cause().map(|c| print_trace_dbg(idx + 1, c));
|
e.cause().map(|c| print_trace_dbg(idx + 1, c));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue