mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Include the SOURCE_ID value in the log messages output for corruption, misuse,
and CANTOPEN errors. FossilOrigin-Name: 1727a81fed65bebfea43e0bda271584096d82785
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -2099,17 +2099,22 @@ int sqlite3_get_autocommit(sqlite3 *db){
|
||||
int sqlite3CorruptError(int lineno){
|
||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
||||
sqlite3_log(SQLITE_CORRUPT,
|
||||
"database corruption found by source line %d", lineno);
|
||||
"database corruption at line %d of [%.10s]",
|
||||
lineno, 20+sqlite3_sourceid());
|
||||
return SQLITE_CORRUPT;
|
||||
}
|
||||
int sqlite3MisuseError(int lineno){
|
||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
||||
sqlite3_log(SQLITE_MISUSE, "misuse detected by source line %d", lineno);
|
||||
sqlite3_log(SQLITE_MISUSE,
|
||||
"misuse at line %d of [%.10s]",
|
||||
lineno, 20+sqlite3_sourceid());
|
||||
return SQLITE_MISUSE;
|
||||
}
|
||||
int sqlite3CantopenError(int lineno){
|
||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
||||
sqlite3_log(SQLITE_CANTOPEN, "cannot open file at source line %d", lineno);
|
||||
sqlite3_log(SQLITE_CANTOPEN,
|
||||
"cannot open file at line %d of [%.10s]",
|
||||
lineno, 20+sqlite3_sourceid());
|
||||
return SQLITE_CANTOPEN;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user