mirror of
https://github.com/orhun/systeroid
synced 2024-07-21 10:25:00 +00:00
style(lib): use a standard format for error messages
This commit is contained in:
parent
f59b808ffa
commit
ad7dfa48ed
|
@ -241,7 +241,7 @@ impl Sysctl {
|
|||
parameters.push(parameter);
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("{} ({})", e, ctl.name()?);
|
||||
eprintln!("error: `{} ({})`", e, ctl.name()?);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ impl<'a> App<'a> {
|
|||
fn fetch_documentation(&mut self, kernel_docs: &Path) -> Result<()> {
|
||||
if !kernel_docs.exists() {
|
||||
eprintln!(
|
||||
"WARN: Linux kernel documentation is not found in path: {:?}",
|
||||
"warning: Linux kernel documentation is not found in path: {:?}",
|
||||
kernel_docs.to_string_lossy()
|
||||
);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ impl<'a> App<'a> {
|
|||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Pager error: {}", e);
|
||||
eprintln!("error: `pager error: {}`", e);
|
||||
fallback_to_default = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ impl Args {
|
|||
|
||||
let matches = opts
|
||||
.parse(&env::args().collect::<Vec<String>>()[1..])
|
||||
.map_err(|e| eprintln!("error: {}", e))
|
||||
.map_err(|e| eprintln!("error: `{}`", e))
|
||||
.ok()?;
|
||||
|
||||
let required_args_present = matches.opt_present("a")
|
||||
|
|
|
@ -6,7 +6,7 @@ fn main() {
|
|||
match systeroid::run(args) {
|
||||
Ok(_) => process::exit(0),
|
||||
Err(e) => {
|
||||
eprintln!("{}", e);
|
||||
eprintln!("error: `{}`", e);
|
||||
process::exit(1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue