mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Experimental implementation of the sqlite3_system_errno() interface.
FossilOrigin-Name: 6782c87b3722fbd09684a5b1e5df05247956f1c6
This commit is contained in:
12
src/util.c
12
src/util.c
@@ -126,6 +126,18 @@ void sqlite3Error(sqlite3 *db, int err_code){
|
||||
if( db->pErr ) sqlite3ValueSetNull(db->pErr);
|
||||
}
|
||||
|
||||
/*
|
||||
** Load the sqlite3.iSysErrno field if that is an appropriate thing
|
||||
** to do based on the SQLite error code in rc.
|
||||
*/
|
||||
void sqlite3SystemError(sqlite3 *db, int rc){
|
||||
if( rc==SQLITE_IOERR_NOMEM ) return;
|
||||
rc &= 0xff;
|
||||
if( rc==SQLITE_CANTOPEN || rc==SQLITE_IOERR ){
|
||||
db->iSysErrno = sqlite3OsGetLastError(db->pVfs);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Set the most recent error code and error string for the sqlite
|
||||
** handle "db". The error code is set to "err_code".
|
||||
|
||||
Reference in New Issue
Block a user