This repository was archived by the owner on Nov 6, 2020. It is now read-only.
File tree 7 files changed +10
-9
lines changed
7 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ name = "parity"
123
123
[profile .release ]
124
124
debug = false
125
125
lto = true
126
+ panic = " abort"
126
127
127
128
[workspace ]
128
129
# This should only list projects that are not
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ impl DisplayMode {
161
161
}
162
162
163
163
fn main ( ) {
164
- panic_hook:: set_abort ( ) ;
164
+ panic_hook:: set ( ) ;
165
165
env_logger:: try_init ( ) . expect ( "Logger initialized only once." ) ;
166
166
167
167
match execute ( env:: args ( ) ) {
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ impl fmt::Display for Error {
147
147
}
148
148
149
149
fn main ( ) {
150
- panic_hook:: set_abort ( ) ;
150
+ panic_hook:: set ( ) ;
151
151
if env:: var ( "RUST_LOG" ) . is_err ( ) {
152
152
env:: set_var ( "RUST_LOG" , "warn" )
153
153
}
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ Display result state dump in standardized JSON format.
99
99
"# ;
100
100
101
101
fn main ( ) {
102
- panic_hook:: set_abort ( ) ;
102
+ panic_hook:: set ( ) ;
103
103
env_logger:: init ( ) ;
104
104
105
105
let args: Args = Docopt :: new ( USAGE ) . and_then ( |d| d. deserialize ( ) ) . unwrap_or_else ( |e| e. exit ( ) ) ;
Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ macro_rules! trace_main {
368
368
}
369
369
370
370
fn main ( ) {
371
- panic_hook:: set_abort ( ) ;
371
+ panic_hook:: set ( ) ;
372
372
373
373
// the user has specified to run its originally installed binary (not via `parity-updater`)
374
374
let force_direct = std:: env:: args ( ) . any ( |arg| arg == "--force-direct" ) ;
Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ extern crate backtrace;
21
21
use std:: io:: { self , Write } ;
22
22
use std:: panic:: { self , PanicInfo } ;
23
23
use std:: thread;
24
- use std:: process;
25
24
use backtrace:: Backtrace ;
26
25
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 ( ) {
29
28
set_with ( |msg| {
30
29
let _ = io:: stderr ( ) . write_all ( msg. as_bytes ( ) ) ;
31
- process:: abort ( )
30
+ // uncomment if panic != "abort"
31
+ // std::process::abort()
32
32
} ) ;
33
33
}
34
34
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ impl fmt::Display for Error {
176
176
}
177
177
178
178
fn main ( ) {
179
- panic_hook:: set_abort ( ) ;
179
+ panic_hook:: set ( ) ;
180
180
181
181
match execute ( env:: args ( ) ) {
182
182
Ok ( _) => {
You can’t perform that action at this time.
0 commit comments