Skip to content

Commit

Permalink
Merge pull request #177 from epage/panic
Browse files Browse the repository at this point in the history
fix: Be friendlier with panics
  • Loading branch information
epage authored Nov 23, 2020
2 parents e379106 + e9b3378 commit 2d662bf
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
91 changes: 91 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ bstr = "0.2"
ahash = "0.5.7"
difflib = "0.4"
proc-exit = "0.3"
human-panic = "1.0.3"

[dev-dependencies]
assert_fs = "1.0"
predicates = "1.0"

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ mod replace;
use proc_exit::WithCodeResultExt;

fn main() {
human_panic::setup_panic!();
let result = run();
proc_exit::exit(result);
}
Expand Down

0 comments on commit 2d662bf

Please sign in to comment.