mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-25 18:38:54 +08:00
@@ -290,3 +290,12 @@ pub fn error_from_handle(db: *mut ffi::sqlite3, code: c_int) -> Error {
|
||||
};
|
||||
error_from_sqlite_code(code, message)
|
||||
}
|
||||
|
||||
macro_rules! check {
|
||||
($funcall:expr) => {{
|
||||
let rc = $funcall;
|
||||
if rc != crate::ffi::SQLITE_OK {
|
||||
Err(crate::error::error_from_sqlite_code(rc, None))?;
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user