aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-03-21 11:57:13 +0000
committerdrh <drh@noemail.net>2016-03-21 11:57:13 +0000
commit80fbee092ed6f2316fde79caeda7ef5684c9f020 (patch)
treee1a921517c302cf3f5d0ca3d23e219617bd4a587 /src/util.c
parent8d2f41ccd2945061d4e1d0e4bf82ef8937637c82 (diff)
downloadsqlite-80fbee092ed6f2316fde79caeda7ef5684c9f020.tar.gz
sqlite-80fbee092ed6f2316fde79caeda7ef5684c9f020.zip
Improved comments. No logical changes to code.
FossilOrigin-Name: a6b6c6c466f3feb257b4fc08ef6b9a27a68ca073
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index b23134291..428dfd046 100644
--- a/src/util.c
+++ b/src/util.c
@@ -118,12 +118,20 @@ const char *sqlite3StrNext(const char *z){
}
/*
-** Set the current error code to err_code and clear any prior error message.
+** Helper function for sqlite3Error() - called rarely. Broken out into
+** a separate routine to avoid unnecessary register saves on entry to
+** sqlite3Error().
*/
static SQLITE_NOINLINE void sqlite3ErrorFinish(sqlite3 *db, int err_code){
if( db->pErr ) sqlite3ValueSetNull(db->pErr);
sqlite3SystemError(db, err_code);
}
+
+/*
+** Set the current error code to err_code and clear any prior error message.
+** Also set iSysErrno (by calling sqlite3System) if the err_code indicates
+** that would be appropriate.
+*/
void sqlite3Error(sqlite3 *db, int err_code){
assert( db!=0 );
db->errCode = err_code;