mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-27 03:51:38 +08:00
Merge pull request #735 from gwenn/extended_result_codes
Activate extended result codes asap
This commit is contained in:
commit
5565ae5629
@ -106,6 +106,10 @@ impl InnerConnection {
|
|||||||
|
|
||||||
return Err(e);
|
return Err(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// attempt to turn on extended results code; don't fail if we can't.
|
||||||
|
ffi::sqlite3_extended_result_codes(db, 1);
|
||||||
|
|
||||||
let r = ffi::sqlite3_busy_timeout(db, 5000);
|
let r = ffi::sqlite3_busy_timeout(db, 5000);
|
||||||
if r != ffi::SQLITE_OK {
|
if r != ffi::SQLITE_OK {
|
||||||
let e = error_from_handle(db, r);
|
let e = error_from_handle(db, r);
|
||||||
@ -113,9 +117,6 @@ impl InnerConnection {
|
|||||||
return Err(e);
|
return Err(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempt to turn on extended results code; don't fail if we can't.
|
|
||||||
ffi::sqlite3_extended_result_codes(db, 1);
|
|
||||||
|
|
||||||
Ok(InnerConnection::new(db, true))
|
Ok(InnerConnection::new(db, true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user