On 16 May 2010, at 3:15pm, Sam Carleton wrote: > On Sat, May 15, 2010 at 6:12 PM, Simon Slavin <slav...@bigfraud.org> wrote: > >> On 15 May 2010, at 10:09pm, Sam Carleton wrote: >> >>> Everything appears to be running fine, but... I was reading the thread >> late >>> last week about SQLITE_BUSY and it got me wondering if I am doing things >>> correctly. >> >> I would like to see documentation on what the Right Thing to do is for >> errors like SQLITE_BUSY from each of the common functions, e.g. on _step, on >> _finalise, etc.. It should include details of whether SQLite does its own >> retries or of how the programmer is expected to time retries. > > Simon, [snip] > > Where can I go to find those answers?
I don't know Sam; I'm agreeing with your original post. I don't think these matters are sufficiently documented. It would be really nice to have documentation for some error codes for each function that tells you how best to recover to a safe condition. For most error codes in most places the error is fatal: the best thing to do is print a diagnostic message and let your application quit, but for errors like SQLITE_CONSTRAINT, SQLITE_BUSY, and SQLITE_LOCKED it would be helpful to know what level of execution was blocked (do I go back to command level or transaction level ?) or what to do before retying, or what else should be done. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users