SQLite Forum

[SOLVED] Getting SQLITE_LOCKED where SQLITE_BUSY is expected
Login
> Perhaps the CLI application can be modified to display the extended error code as well as the text. ...

This seems like a good idea to me, and fairly simple to implement. I think it's a v3.38 feature though because of the current state of v3.37 development.

> Also, could the word Error: be augmented to indicate WHERE the error was detected: `Error during Prepare:` or `Error during Step:` if it can be determined whether the error was detected at PREPARE or STEP time (though it is noteworthy that errors can already be distinguished because there are very few errors that can occur at BOTH places rather than only one).

At present, any error returned from sqlite3_step() is silently treated as the end of stepping. Given the potential locking issues raised in this thread, that seems like a behavior worth changing. That will necessitate some modest internal restructuring which definitely makes it a post-v3.37 task.