How to report and error to user?
Posted: Fri Oct 11, 2013 2:16 pm
[This post is an archive from the old SQL Yoga forums]
I have a SQLyoga query which operates on a user supplied string which is applied to the MATCH function on a FTS table.
It is possible that the supplied string is malformed and I want to inform the user of this, specifically.
It is too complicated to parse all variations of possible malformations so I am happy to let SQLITE throw the query out.
I follow the query with the normal test on the result to see if it contains "err" and exit if it does.
However I would like to specify what the problem was rather than "an error with SQL has occurred" which is what comes up on the answer dialog.
Is there anyway I can customise this message?
I have a SQLyoga query which operates on a user supplied string which is applied to the MATCH function on a FTS table.
It is possible that the supplied string is malformed and I want to inform the user of this, specifically.
It is too complicated to parse all variations of possible malformations so I am happy to let SQLITE throw the query out.
I follow the query with the normal test on the result to see if it contains "err" and exit if it does.
However I would like to specify what the problem was rather than "an error with SQL has occurred" which is what comes up on the answer dialog.
Is there anyway I can customise this message?