elaborate error macro and apply at various callsites

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-13 21:11:05 +00:00
parent b3f2288d07
commit 05efd9b044
23 changed files with 161 additions and 140 deletions

View file

@ -1,6 +1,6 @@
use std::{panic::AssertUnwindSafe, sync::Arc, time::Duration};
use conduit::{debug, debug_warn, error, trace, utils::time, warn, Error, Result, Server};
use conduit::{debug, debug_warn, error, trace, utils::time, warn, Err, Error, Result, Server};
use futures_util::FutureExt;
use tokio::{
sync::{Mutex, MutexGuard},
@ -129,10 +129,7 @@ impl Manager {
/// Start the worker in a task for the service.
async fn start_worker(&self, workers: &mut WorkersLocked<'_>, service: &Arc<dyn Service>) -> Result<()> {
if !self.server.running() {
return Err(Error::Err(format!(
"Service {:?} worker not starting during server shutdown.",
service.name()
)));
return Err!("Service {:?} worker not starting during server shutdown.", service.name());
}
debug!("Service {:?} worker starting...", service.name());