Skip to content

Commit

Permalink
impl From<JoinError> for RwError
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
  • Loading branch information
BugenZhao committed Feb 5, 2024
1 parent 07d1685 commit b38e8b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/frontend/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use risingwave_pb::PbFieldNotFound;
use risingwave_rpc_client::error::{RpcError, TonicStatusWrapper};
use thiserror::Error;
use thiserror_ext::Box;
use tokio::task::JoinError;

/// The error type for the frontend crate, acting as the top-level error type for the
/// entire RisingWave project.
Expand Down Expand Up @@ -222,3 +223,9 @@ impl From<BatchError> for RwError {
ErrorCode::BatchError(Box::new(s)).into()
}
}

impl From<JoinError> for RwError {
fn from(join_error: JoinError) -> Self {
ErrorCode::Uncategorized(join_error.into()).into()
}
}

0 comments on commit b38e8b6

Please sign in to comment.