Expose sqlite3_system_errno() on SqliteError
I have an application that sometimes mysteriously fails with SQLITE_CANTOPEN and no further diagnostic information. Poking around the SQLite docs, I found sqlite3_system_errno(), which sounds like it will tell me more information, and so would be helpful to have on SqliteError.
I briefly investigated adding this, but (a) lzz and (b) I don’t feel like I understand the SQLite API well enough to be confident I got it right: poking around I see that sqliteSystemError only sets this under certain circumstances and it seems like it is otherwise undefined, which could lead people down a rabbit hole if it happens to end up with a misleading value. (See also this discussion which comes to a similar conclusion, but this seems poorly documented and possibly prone to change later.)
Sometimes it would definitely help to have access to the latest error.
If you just want to try things out, you do not have to use lzz. You can directly edit the existing better_sqlite3.hpp or better_sqlite3.cpp. lzz may just be used to recreate those from the .lzz sources but is not trigged automatically when building the library.
FWIW, lzz has finally been removed from the repo.