Log error return from main() with tracing
Previously this was printed to `stderr`, but not written to journald.
This commit is contained in:
parent
f56ccf0a2e
commit
38fe84abcf
1 changed files with 8 additions and 1 deletions
|
|
@ -99,7 +99,14 @@ impl State {
|
|||
}
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
fn main() {
|
||||
if let Err(err) = main_inner() {
|
||||
error!("Error occured in main(): {}", err);
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
fn main_inner() -> Result<(), Box<dyn Error>> {
|
||||
let raw_args = RawArgs::from_args();
|
||||
let mut cursor = raw_args.cursor();
|
||||
let git_hash = option_env!("GIT_HASH").unwrap_or("unknown");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue