Sq3LiteC - work with an error … More...
Functions | |
static enum Sq3ErrorE | Sq3LiteErrCode (SQ3_LITE db) |
Error Codes And Messages … | |
static MK_STRN | Sq3LiteErrMsg (SQ3_LITE sq3lite) |
Error Codes And Messages … | |
static enum MkErrorE | Sq3LiteErrorOffset (SQ3_LITE db) |
Error Codes And Messages … | |
static enum Sq3ExtendetResultCodesE | Sq3LiteExtendetErrCode (SQ3_LITE db) |
Error Codes And Messages … | |
static enum MkErrorE | Sq3LiteSystemErrno (SQ3_LITE sq3lite) |
Low-level system error code … | |
static MK_STRN | Sq3LiteErrStr (MK_I32 arg0) |
Error Codes And Messages … | |
Sq3LiteC - Sq3LiteC_Error_C_API - function | |
enum Sq3ErrorE | Sq3LiteErrCodeP (SQ3_LITE db) |
Non-inline replacement for Sq3LiteErrCode … | |
MK_STRN | Sq3LiteErrMsgP (SQ3_LITE sq3lite) |
Non-inline replacement for Sq3LiteErrMsg … | |
enum MkErrorE | Sq3LiteErrorOffsetP (SQ3_LITE db) |
Non-inline replacement for Sq3LiteErrorOffset … | |
enum Sq3ExtendetResultCodesE | Sq3LiteExtendetErrCodeP (SQ3_LITE db) |
Non-inline replacement for Sq3LiteExtendetErrCode … | |
enum MkErrorE | Sq3LiteSystemErrnoP (SQ3_LITE sq3lite) |
Non-inline replacement for Sq3LiteSystemErrno … | |
MK_STRN | Sq3LiteErrStrP (MK_I32 arg0) |
Non-inline replacement for Sq3LiteErrStr … | |
Sq3LiteC - Sq3LiteC_Error_C_API - overload | |
#define | Sq3LiteErrorOffset_E(...) |
#define | Sq3LiteErrorOffset_C(...) |
#define | Sq3LiteSystemErrno_E(...) |
#define | Sq3LiteSystemErrno_C(...) |
Sq3LiteC - work with an error …
#define Sq3LiteErrorOffset_C | ( | ... | ) |
Definition at line 381 of file sqlite3_overload_sq3.h.
#define Sq3LiteErrorOffset_E | ( | ... | ) |
Definition at line 380 of file sqlite3_overload_sq3.h.
#define Sq3LiteSystemErrno_C | ( | ... | ) |
Definition at line 383 of file sqlite3_overload_sq3.h.
#define Sq3LiteSystemErrno_E | ( | ... | ) |
Definition at line 382 of file sqlite3_overload_sq3.h.
Error Codes And Messages …
If the most recent sqlite3_* API call associated with database connection D failed, then the Sq3LiteErrCode(D) interface returns the numeric result code or extended result code for that API call. The Sq3LiteExtendetErrCode() interface is the same except that it always returns the extended result code even when extended result codes are disabled.
The values returned by Sq3LiteErrCode() and/or Sq3LiteExtendetErrCode() might change with each API call. Except, there are some interfaces that are guaranteed to never change the value of the error code. The error-code preserving interfaces include the following:
The Sq3LiteErrMsg() and sqlite3_errmsg16() return English-language text that describes the error, as either UTF-8 or UTF-16 respectively. (See how SQLite handles invalid UTF for exceptions to this rule.) Memory to hold the error message string is managed internally. The application does not need to worry about freeing the result. However, the error string might be overwritten or deallocated by subsequent calls to other SQLite interface functions.
The Sq3LiteErrStr() interface returns the English-language text that describes the result code, as UTF-8. Memory to hold the error message string is managed internally and must not be freed by the application.
If the most recent error references a specific token in the input SQL, the Sq3LiteErrorOffset() interface returns the byte offset of the start of that token. The byte offset returned by Sq3LiteErrorOffset() assumes that the input SQL is UTF8. If the most recent error does not reference a specific token in the input SQL, then the Sq3LiteErrorOffset() function returns -1.
When the serialized threading mode is in use, it might be the case that a second error occurs on a separate thread in between the time of the first error and the call to these interfaces. When that happens, the second error will be reported since these interfaces always report the most recent result. To avoid this, each thread can obtain exclusive use of the database connection D by invoking sqlite3_mutex_enter(sqlite3_db_mutex(D)) before beginning to use D and invoking sqlite3_mutex_leave(sqlite3_db_mutex(D)) after all calls to the interfaces listed here are completed.
If an interface fails with SQ3_RESULT_MISUSE, that means the interface was invoked incorrectly by the application. In that case, the error code and message may or may not be set.
Reference code from sqlite3:
Definition at line 206 of file Sq3LiteC_sq3.h.
Non-inline replacement for Sq3LiteErrCode …
Error Codes And Messages …
Definition at line 212 of file Sq3LiteC_sq3.h.
Non-inline replacement for Sq3LiteErrMsg …
Error Codes And Messages …
Definition at line 219 of file Sq3LiteC_sq3.h.
Non-inline replacement for Sq3LiteErrorOffset …
Error Codes And Messages …
Definition at line 247 of file Sq3LiteC_sq3.h.
Non-inline replacement for Sq3LiteErrStr …
|
inlinestatic |
Error Codes And Messages …
Definition at line 229 of file Sq3LiteC_sq3.h.
enum Sq3ExtendetResultCodesE Sq3LiteExtendetErrCodeP | ( | SQ3_LITE | db | ) |
Non-inline replacement for Sq3LiteExtendetErrCode …
Low-level system error code …
Attempt to return the underlying operating system error code or error number that caused the most recent I/O error or failure to open a file. The return value is OS-dependent. For example, on unix systems, after Sq3LiteOpenV2 () returns SQ3_RESULT_CANTOPEN, this interface could be called to get back the underlying "errno" that caused the problem, such as ENOSPC, EAUTH, EISDIR, and so forth.
Reference code from sqlite3:
Definition at line 235 of file Sq3LiteC_sq3.h.
Non-inline replacement for Sq3LiteSystemErrno …