Print errors to stderr
This commit is contained in:
parent
0c883413ce
commit
920dcf4ff7
1 changed files with 2 additions and 2 deletions
|
@ -7,12 +7,12 @@ fn main() {
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
|
|
||||||
let config = Config::build(&args).unwrap_or_else(|err| {
|
let config = Config::build(&args).unwrap_or_else(|err| {
|
||||||
println!("Problem parsing arguments: {err}");
|
eprintln!("Problem parsing arguments: {err}");
|
||||||
process::exit(1);
|
process::exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
if let Err(e) = minigrep::run(config) {
|
if let Err(e) = minigrep::run(config) {
|
||||||
println!("Application error: {e}");
|
eprintln!("Application error: {e}");
|
||||||
process::exit(1);
|
process::exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue