Skip to content

Commit

Permalink
refactor: exit with status code 1 instead of panic
Browse files Browse the repository at this point in the history
It's just prettier xd
  • Loading branch information
MilkeeyCat committed Jun 3, 2024
1 parent 04889a8 commit 9af0dfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ fn main() {
let (stmts, symtable) = parser.into_parts();
let stmts = match stmts {
Ok(stmts) => stmts,
Err(e) => panic!("Achtung: {}", e),
Err(e) => {
println!("Achtung: {}", e);
std::process::exit(1)
}
};

dbg!(&stmts);
Expand Down

0 comments on commit 9af0dfa

Please sign in to comment.