* Nathan Kurz: > On Wed, Nov 16, 2005 at 01:16:40PM +0100, Florian Weimer wrote: >> * D. Richard Hipp: >> >> > If an error occurs in a step function, record that fact in >> > the aggregate context. Then when the finalizer is called, >> > check the error flag in the context and call sqlite3_result_error >> > at that point if it is appropriate to do so. >> >> Does this really work? According to my experiments, the fact that >> sqlite3_result_error has been called from the finalizer is ignored. >> The sources seem to lack the appropriate check, but I'm not sure. > > I haven't looked at the code that handles it, but in practice it seems > that an error returned from the step function is noticed and aborts > the query, but gives only the non-descript error message: "SQL logic > error or missing database". An error returned from the final function > is ignored, and the string of the error message is used as the result.
Thanks for the confirmation, so I'm not imagining things. Unfortunately, signaling errors from the step function causes a segmentation fault on my system (actually, I tested this only through the apsw Python wrapper, which indirectly sparked this thread). It's not a terribly important issue for me at this stage, I just spotted it while writing test cases for some of my own code.