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

Commit e91ff1f

Browse files
committed
set panic = "abort"
1 parent 127140e commit e91ff1f

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ name = "parity"
123123
[profile.release]
124124
debug = false
125125
lto = true
126+
panic = "abort"
126127

127128
[workspace]
128129
# This should only list projects that are not

accounts/ethkey/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl DisplayMode {
161161
}
162162

163163
fn main() {
164-
panic_hook::set_abort();
164+
panic_hook::set();
165165
env_logger::try_init().expect("Logger initialized only once.");
166166

167167
match execute(env::args()) {

accounts/ethstore/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl fmt::Display for Error {
147147
}
148148

149149
fn main() {
150-
panic_hook::set_abort();
150+
panic_hook::set();
151151
if env::var("RUST_LOG").is_err() {
152152
env::set_var("RUST_LOG", "warn")
153153
}

evmbin/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Display result state dump in standardized JSON format.
9999
"#;
100100

101101
fn main() {
102-
panic_hook::set_abort();
102+
panic_hook::set();
103103
env_logger::init();
104104

105105
let args: Args = Docopt::new(USAGE).and_then(|d| d.deserialize()).unwrap_or_else(|e| e.exit());

parity/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ macro_rules! trace_main {
368368
}
369369

370370
fn main() {
371-
panic_hook::set_abort();
371+
panic_hook::set();
372372

373373
// the user has specified to run its originally installed binary (not via `parity-updater`)
374374
let force_direct = std::env::args().any(|arg| arg == "--force-direct");

util/panic-hook/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ extern crate backtrace;
2121
use std::io::{self, Write};
2222
use std::panic::{self, PanicInfo};
2323
use std::thread;
24-
use std::process;
2524
use backtrace::Backtrace;
2625

27-
/// Set the panic hook to write to stderr and abort the process when a panic happens.
28-
pub fn set_abort() {
26+
/// Set the panic hook to write a backtrace to stderr when a panic happens.
27+
pub fn set() {
2928
set_with(|msg| {
3029
let _ = io::stderr().write_all(msg.as_bytes());
31-
process::abort()
30+
// uncomment if panic != "abort"
31+
// std::process::abort()
3232
});
3333
}
3434

whisper/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl fmt::Display for Error {
176176
}
177177

178178
fn main() {
179-
panic_hook::set_abort();
179+
panic_hook::set();
180180

181181
match execute(env::args()) {
182182
Ok(_) => {

0 commit comments

Comments
 (0)