Skip to content

Commit

Permalink
fix(rust): use fatal! instead of exit
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia authored Sep 2, 2024
1 parent b8c24a9 commit 7222fca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rust/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,10 @@ impl OptionsExt for Options {

if let Some(ref psm) = args.psm {
if !(0..=13).contains(psm) {
println!("--psm must be between 0 and 13");
std::process::exit(ExitCode::MalformedParameter as i32);
fatal!(
cause = ExitCause::MalformedParameter;
"--psm must be between 0 and 13"
);
}
self.psm = *psm as _;
}
Expand Down

0 comments on commit 7222fca

Please sign in to comment.