Introduce err macro

This commit is contained in:
gwenn
2024-12-08 17:02:58 +01:00
parent 8081589201
commit e025f283f5
8 changed files with 40 additions and 70 deletions

View File

@@ -608,10 +608,7 @@ impl Statement<'_> {
}
#[cfg(feature = "functions")]
ToSqlOutput::Arg(_) => {
return Err(Error::SqliteFailure(
ffi::Error::new(ffi::SQLITE_MISUSE),
Some(format!("Unsupported value \"{value:?}\"")),
));
return Err(err!(ffi::SQLITE_MISUSE, "Unsupported value \"{value:?}\""));
}
#[cfg(feature = "array")]
ToSqlOutput::Array(a) => {