Print more anyhow errors with their causes

This commit is contained in:
link2xt
2023-01-04 14:37:12 +00:00
parent 2b4e32d2cf
commit 754c7324f5
11 changed files with 49 additions and 46 deletions

View File

@@ -383,7 +383,7 @@ impl Context {
let mut lock = self.inner.scheduler.write().await;
if lock.is_none() {
match Scheduler::start(self.clone()).await {
Err(err) => error!(self, "Failed to start IO: {}", err),
Err(err) => error!(self, "Failed to start IO: {:#}", err),
Ok(scheduler) => *lock = Some(scheduler),
}
}
@@ -499,7 +499,7 @@ impl Context {
match &*s {
RunningState::Running { cancel_sender } => {
if let Err(err) = cancel_sender.send(()).await {
warn!(self, "could not cancel ongoing: {:?}", err);
warn!(self, "could not cancel ongoing: {:#}", err);
}
info!(self, "Signaling the ongoing process to stop ASAP.",);
*s = RunningState::ShallStop;