On 07/07/2017 12:04, Simon Slavin wrote:
I note that the "extended result code" feature is relevent:
<https://sqlite.org/c3ref/c_ioerr_access.html>
You’re proposing two error codes like
SQLITE_FILE_NODATABBASE
SQLITE_FILE_NOTADATABBASE
for a missing database file, and for one which has the wrong text in the magic
header area.
I’d suggest some of my own:
SQLITE_API_BADARGUMENT
SQLITE_API_WRONGORDER
SQLITE_SQL_BADSYNTAX
SQLITE_SQL_WRONGORDER
Does anyone want to contribute others ?
There are some other problems in error definitions. For example, what
does SQLITE_FULL mean? How can database be full? Is it really a
disk-full condition?
> #define SQLITE_FULL 13 /* Insertion failed because database
is full */
Also, what does
#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8))
really mean? How is it different from the case when database is
corrupt/truncated? But there is SQLITE_CORRUPT for that.
Short read mean EOF, and EOF in unexpected place constitutes corrupt database
file.
Yuri
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users