Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
updates error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
brenomfviana committed Mar 29, 2020
1 parent 257d374 commit 3d11626
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ impl Config {
fn new(args: &[String]) -> Config {
// Check if the arguments are valid
match args.len() {
3 => {}, // Right number of arguments
0 => panic!("ERROR: How did you do it?"),
1 => panic!("ERROR: You did not enter any arguments."),
2 => panic!("ERROR: You did not enter the filename."),
Expand Down

0 comments on commit 3d11626

Please sign in to comment.