Report application errors
This commit is contained in:
parent
6a8a5c234e
commit
c68a76f2e8
1 changed files with 4 additions and 1 deletions
|
@ -14,7 +14,10 @@ fn main() {
|
|||
println!("Searching for {}", config.query);
|
||||
println!("In file {}", config.file_path);
|
||||
|
||||
run(config);
|
||||
if let Err(e) = run(config) {
|
||||
println!("Application error: {e}");
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
fn run(config: Config) -> Result<(), Box<dyn Error>> {
|
||||
|
|
Loading…
Reference in a new issue