Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Oct 29, 2024
1 parent 52425e2 commit 6fb8e0e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/batch/src/executor/mysql_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ macro_rules! mysql_value_to_scalar {
Some(Ok(Some(val))) => Some(ScalarImpl::$variant(val.into())),
Some(Ok(None)) => None,
Some(Err(e)) => {
let e: anyhow::Error = anyhow::Error::new(e.clone()).context(format!(
"failed to deserialize column {} at index {} as value of rust_type: {}",
$name,
$i,
stringify!($ty),
));
let e: anyhow::Error = anyhow::Error::new(e.clone())
.context("failed to deserialize MySQL value into rust value")
.context(format!(
"column: {}, index: {}, rust_type: {}",
$name,
$i,
stringify!($ty),
));
let e = BatchExternalSystemError(e);
return Err(e.into());
}
Expand Down

0 comments on commit 6fb8e0e

Please sign in to comment.