Cleaned up error messages
Rust fmt
@@ -517,22 +517,6 @@ pub fn dump_testament() {
}
}
-pub fn report_error(e: &Error) {
- err!("{}", e);
-
- for e in e.iter().skip(1) {
- info!("caused by: {}", e);
- }
-
- if show_backtrace() {
- if let Some(backtrace) = e.backtrace() {
- info!("backtrace:");
- println!();
- println!("{:?}", backtrace);
- }
- } else {
- }
-
fn show_backtrace() -> bool {
if let Ok(true) = env::var("RUSTUP_NO_BACKTRACE").map(|s| s == "1") {
return false;
@@ -550,4 +534,18 @@ pub fn report_error(e: &Error) {
false
}
+
+pub fn report_error(e: &Error) {
+ err!("{}", e);
+
+ for e in e.iter().skip(1) {
+ err!("caused by: {}", e);
+ }
+
+ if show_backtrace() {
+ if let Some(backtrace) = e.backtrace() {
+ err!("backtrace:");
+ err!("{:?}", backtrace);
+ }
+ }
}
