diff options
author | Joseph <jngugi88@gmail.com> | 2018-10-31 17:30:52 +0300 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-31 07:30:52 -0700 |
commit | 21dac6646552dcacb68a0ad167723976f27b5c47 (patch) | |
tree | 40b0981423a59154f267ef1cba775799b85b3abc /src | |
parent | 162eeca3734cd88b311150bcaa3f97e120b91f29 (diff) |
Better output on panic (#1129)
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 3865e9253..515f60f88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,11 +66,7 @@ fn main() { // https://github.com/rust-lang/cargo/issues/2738 // Therefore this hack. std::panic::set_hook(Box::new(|panic_info| { - if let Some(location) = panic_info.location() { - eprintln!("PANIC file '{}' line {}", location.file(), location.line()); - } else { - eprintln!("PANIC occurred but can't get location information..."); - } + eprintln!("{}", panic_info.to_string()); std::process::abort(); })); |