Better error message for PID file creation failure (#6)
Reviewed-on: #6
This commit is contained in:
commit
fdfc103554
1 changed files with 8 additions and 1 deletions
|
@ -34,7 +34,14 @@ pub fn init(data_paths: DataPaths, server_parameters: ServerParameters) {
|
|||
}
|
||||
info!("Found PID file at {pid_file_path:?}, overwriting...");
|
||||
}
|
||||
let pid_file = qpidfile::Pidfile::new(pid_file_path).unwrap();
|
||||
let pid_file = match qpidfile::Pidfile::new(&pid_file_path) {
|
||||
Ok(pidfile) => pidfile,
|
||||
Err(e) => {
|
||||
error!("Failed to create PID file at {}", pid_file_path.display());
|
||||
error!("{}", e);
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
let runtime = match tokio::runtime::Runtime::new() {
|
||||
Err(e) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue