Error Codes And Messages
2012-08-05 09:00
381 查看
Error Codes And Messages
int sqlite3_errcode(sqlite3 *db); int sqlite3_extended_errcode(sqlite3 *db); const char *sqlite3_errmsg(sqlite3*); const void *sqlite3_errmsg16(sqlite3*);
The sqlite3_errcode() interface returns the numeric result code or extended result
code for the most recent failed sqlite3_* API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, the return value
from sqlite3_errcode() is undefined. The sqlite3_extended_errcode() interface is the same except that it always returns the extended result code even when extended
result codes are disabled.
The sqlite3_errmsg() and sqlite3_errmsg16() return English-language text that describes the error, as either UTF-8 or UTF-16 respectively. 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.
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 invokingsqlite3_mutex_leave(sqlite3_db_mutex(D)) after all calls to the
interfaces listed here are completed.
If an interface fails with SQLITE_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.
相关文章推荐
- MySQL Server Error Codes and Messages
- Exceptions and Error Codes
- SQlite数据库的C编程接口(六) 返回值和错误码(Result Codes and Error Codes) ——《Using SQlite》读书笔记
- VuGen returns the following error and warning codes during replay of Windows Sockets script:
- SQlite数据库的C编程接口(六) 返回值和错误码(Result Codes and Error Codes) ——《Using SQlite》读书笔记
- LDAP Error and Result Codes
- SQlite数据库的C编程接口(六) 返回值和错误码(Result Codes and Error Codes)
- SLF4J warning or error messages and their meanings(转)
- Custom tool error: Failed to generate code for the service reference ××××××. Please check other error and warning messages for details.
- SQlite数据库的C编程接口(六) 返回值和错误码(Result Codes and Error Codes) ——《Using SQlite》读书笔记
- Undocumented NSURLErrorDomain error codes (-1001, -1003 and -1004) using StoreKit
- SLF4J warning or error messages and their meanings
- 边学边做ROR( 错误信息error_messages_for was removed from Rails and is now available as a plugin)
- HTTP Error Codes and what they mean
- FTP Status and Error Codes
- Linux and Windows System Error Codes
- SLF4J warning or error messages and their meanings
- GSM Equipment and Network Error Codes
- Logback (8) | Logback error messages and their meanings
- 发布和发送消息(Posting and Sending Messages)