1
0
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:
drh
2016-03-17 16:01:23 +00:00
parent 4b058dd4d1
commit 1b9f2141a7
11 changed files with 64 additions and 27 deletions

View File

@@ -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".