Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
panic_hook module uses eprintln instead of raw stderr interface (#10426)
Browse files Browse the repository at this point in the history
  • Loading branch information
debris authored and ascjones committed Feb 27, 2019
1 parent cfc8df1 commit 3d0ce10
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/panic-hook/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
extern crate backtrace;

use std::io::{self, Write};
use std::panic::{self, PanicInfo};
use std::thread;
use std::process;
Expand All @@ -27,7 +26,7 @@ use backtrace::Backtrace;
/// Set the panic hook to write to stderr and abort the process when a panic happens.
pub fn set_abort() {
set_with(|msg| {
let _ = io::stderr().write_all(msg.as_bytes());
eprintln!("{}", msg);
process::abort()
});
}
Expand Down

0 comments on commit 3d0ce10

Please sign in to comment.