Better error messages
This commit is contained in:
parent
10153f6316
commit
89be84860d
|
@ -18,7 +18,7 @@ fn main() -> io::Result<()> {
|
|||
None => eprintln!("Invalid parameters")
|
||||
}
|
||||
} else {
|
||||
eprintln!("Doby format not recognized.");
|
||||
eprintln!("doby format not recognized.");
|
||||
}
|
||||
Ok(())
|
||||
}
|
|
@ -181,7 +181,7 @@ fn number<T: FromStr>(val: &str) -> Option<T> {
|
|||
match val.parse::<T>() {
|
||||
Ok(n) => Some(n),
|
||||
Err(_) => {
|
||||
eprintln!("Cannot parse '{}' to '{}'", val, std::any::type_name::<T>());
|
||||
eprintln!("Error: '{}' is not a number", val);
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ impl WrappedPassword {
|
|||
} else {
|
||||
password.zeroize();
|
||||
password_confirm.zeroize();
|
||||
eprintln!("Passwords don't match");
|
||||
eprintln!("Error: passwords don't match");
|
||||
None
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -40,7 +40,7 @@ fn run() -> bool {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
eprintln!("Invalid parameters")
|
||||
eprintln!("Error: invalid encryption parameters")
|
||||
}
|
||||
}
|
||||
Err(e) => eprintln!("I/O error while reading headers: {}", e)
|
||||
|
|
Loading…
Reference in New Issue