Open popzxc opened 2 years ago
Thanks for the suggestion! I haven't heard about the human-panic
package, it looks cool 👍🏻
I guess, the only argument for not using it is to have fewer dependencies 🤔
Also, in my file I'm using process::exit(1)
instead of panic!("...")
. Will there be any difference?
Well, Rust uses error code 101 for panics. I don't think there should be any other differences related to the process termination.
Heya! Looking at this file it seems that you've imlpemented a small toolset for graceful exits upon meeting an irrecoverable error.
However, there exists a crate named human-panic which serves the same functionality, but handles everything automatically and provides more info for debug. As a bonus, it'll also catch any other panic if it'll ever occur.