I have the need to use some math extension functions. While testing them I found it very difficult to select an informative error code in case of a domain error, like sqrt(-1).

Would it be sensible to create a new generic error code in some next release for extension functions to report such kind of errors? It would then be easier to track down the source of the issue if such error code existed, rather than being confronted to the uninformative SQLITE_ERROR "SQL error or missing database".

Returning NULL silently is not the best choice in some cases (math functions for instance but it could serve other cases as well), where it is desirable to keep the distinction between a NULL argument (here returning NULL makes sense) and an out of range argument (here no return value makes sense).

SQLITE_MISMATCH, SQLITE_MISUSE and SQLITE_RANGE already exist but have precise, completely different meanings and should certainly not be used in those cases.

Something like:
#define SQLITE_DOMAIN 27 /* Type, format or domain error in extension function */

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to