[CWB] CQi error report system
Hardie, Andrew
a.hardie at lancaster.ac.uk
Wed Oct 13 17:33:32 CEST 2010
In cqpserver.c. there is the following pair of lines:
if (!cqp_parse_string(cqp_query))
cqi_command(CQI_CQP_ERROR_GENERAL); /* should be changed to detailed
error messages */
... Which suggests that this feature is simply not finished yet. But I'm
not sure how you'd modify that to get the right error constant; the
return value of cqp_parse_string() obviously isn't enough information.
CQI_CTRL_LAST_GENERAL_ERROR probably ought to be giving you a better
error message than this, the reason it doesn't (I suspect!) is that the
error-string-setting function cqi_general_error() is not being called at
this point.
I'm reluctant to dive in and change any of this since my understanding
of CQi is somewhat minimal - Stefan knows it much better than I do.
Andrew.
> -----Original Message-----
> From: cwb-bounces at sslmit.unibo.it
> [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Matthieu Decorde
> Sent: 13 October 2010 15:57
> To: Open source development of the Corpus WorkBench
> Subject: [CWB] CQi error report system
>
>
> Hi,
>
> We use CQi in our TXM application and we want to retrieve CQP
> syntax error reports from the cqpcl server.
>
> I saw that CQi defines some constants about CQP errors in cqi.h :
> #define CQI_CQP_ERROR_GENERAL 0x0501
> #define CQI_CQP_ERROR_NO_SUCH_CORPUS 0x0502 #define
> CQI_CQP_ERROR_INVALID_FIELD 0x0503 #define
> CQI_CQP_ERROR_OUT_OF_RANGE 0x0504
>
> But it seems that the 0x0501 code is the only error code that
> CQi is able to return.
>
> For example, requests like je" return 0x0501, but the std
> output stream of cqpserver reports a "No such corpus error".
>
> I also tried the CQI_CTRL_LAST_GENERAL_ERROR command, but it
> seems that it is not its job to report this kind of error.
> When I call it it always reports "No error".
>
> Did I miss something about the CQi errors reporting system ?
>
> By the way, after a "No such corpus error", the next request
> fails, is there a way to tell CQi to cancel the previous requests ?
>
> Thanks for your help,
> Matthieu Decorde
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://devel.sslmit.unibo.it/mailman/listinfo/cwb
>
More information about the CWB
mailing list