projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
72d7fa4
)
Better error reporting for CQL-to-RPN conversion failure
author
Mike Taylor
<mike@indexdata.com>
Tue, 27 May 2003 09:42:08 +0000
(09:42 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Tue, 27 May 2003 09:42:08 +0000
(09:42 +0000)
client/client.c
patch
|
blob
|
history
diff --git
a/client/client.c
b/client/client.c
index
4afeda1
..
d44b50e
100644
(file)
--- a/
client/client.c
+++ b/
client/client.c
@@
-2,7
+2,7
@@
* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.198 2003-05-23 08:52:35 adam Exp $
+ * $Id: client.c,v 1.199 2003-05-27 09:42:08 mike Exp $
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-1068,16
+1068,15
@@
static int send_searchRequest(const char *arg)
}
parser = cql_parser_create();
if ((error = cql_parser_string(parser, arg)) != 0) {
}
parser = cql_parser_create();
if ((error = cql_parser_string(parser, arg)) != 0) {
- /* ### must do better with the reporting here */
- printf("CQL ERROR %d: presumably a syntax error?\n", error);
+ printf("Can't parse CQL: must be a syntax error\n");
return 0;
}
node = cql_parser_result(parser);
if ((error = cql_transform_buf(cqltrans, node, pqfbuf,
sizeof pqfbuf)) != 0) {
error = cql_transform_error(cqltrans, &addinfo);
return 0;
}
node = cql_parser_result(parser);
if ((error = cql_transform_buf(cqltrans, node, pqfbuf,
sizeof pqfbuf)) != 0) {
error = cql_transform_error(cqltrans, &addinfo);
- printf ("Couldn't convert CQL to PQF: error #%d (addinfo=%s)\n",
- error, addinfo);
+ printf ("Can't convert CQL to PQF: %s (addinfo=%s)\n",
+ cql_strerror(error), addinfo);
return 0;
}
arg = pqfbuf;
return 0;
}
arg = pqfbuf;