errors now write to stderr instead of stdout
This commit is contained in:
parent
6a9bbe664a
commit
05e1bd48e0
1 changed files with 4 additions and 4 deletions
|
@ -1,24 +1,24 @@
|
|||
use std::process::exit;
|
||||
|
||||
pub fn unmatched_flag(target: String) {
|
||||
println!("pride: no flag {target}");
|
||||
eprintln!("pride: no flag {target}");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
pub fn size_missing() {
|
||||
println!("pride: size flag requires a value");
|
||||
eprintln!("pride: size flag requires a value");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
pub fn size_error(value: &str) {
|
||||
println!("pride: size '{value}' is invalid");
|
||||
eprintln!("pride: size '{value}' is invalid");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
pub fn too_small(width: u16, height: u16) {
|
||||
println!("pride: this flag must be bigger than {width}x{height}");
|
||||
eprintln!("pride: this flag must be bigger than {width}x{height}");
|
||||
exit(3);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue