Skip to content

Commit

Permalink
fix: error in log output
Browse files Browse the repository at this point in the history
  • Loading branch information
pk5ls20 committed Feb 13, 2025
1 parent f32df1e commit 72bfea8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mania/src/core/business.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub enum BusinessError {
#[error("An mania error occurred: {0}")]
GenericError(String),

#[error("An mania internal event error occurred: {0}")]
#[error("{0}")]
InternalEventError(#[from] EventError),
}

Expand Down Expand Up @@ -254,7 +254,12 @@ impl BusinessHandle {
tx.send(result).expect("receiver dropped");
} else if let Err(e) = &result {
match e {
BusinessError::InternalEventError(inner_err @ EventError::UnsupportedEvent(_)) => {
BusinessError::InternalEventError(inner_err)
if matches!(
inner_err,
EventError::UnsupportedEvent(_) | EventError::InternalWarning(_)
) =>
{
tracing::warn!("{}", inner_err);
}
_ => {
Expand Down

0 comments on commit 72bfea8

Please sign in to comment.