Skip to content

Commit

Permalink
Better output on panic (denoland#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kachulio1 authored and ry committed Oct 31, 2018
1 parent 162eeca commit 21dac66
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}));

Expand Down

0 comments on commit 21dac66

Please sign in to comment.