On Thu, 2012-12-13 at 18:30 +0100, Christian Grün wrote:
Hi Liam,
(1) The sample perl files and the perl module implementing the API mention a readme file that explains the methods; does anyone know where one might find such a readme file? It might answer my other question...
The quoted readme.txt file is currently found in the parent directory, which lists all other client APIs [1].
Thank you, this led me to http://docs.basex.org/wiki/Server_Protocol which at least gave a list of methods and what they are expected to do.
(2) if there's an error in my query and I catch the exception, the message I get is about how many milliseconds the query took, not the actual error. I can enclose my Perl script, but I'm wondering if others have seen this?
In Perl, the error message can be retrieved by enclosing the query with eval {...} and printing $@ if an error occurs. This is eg shown in Example.pl. If this does not help, you are invited to send us an example that demonstrates what goes wrong.
Enclosed. When I run this the error I get is always: Database 'rdf' was opened in 0.6 ms.
If I use the commandline BsaeX program on the same query I get this instead (for this same deliberately malformed query): $ ~/packages/basex/BaseX7.3/bin/basexclient Username: admin Password: BaseX 7.3 [Client] Try help to get more information.
open rdf
Database 'rdf' was opened in 0.65 ms.
run /home/liam/tmp/error.xq
Stopped at line 1, column 9 in /home/liam/tmp/error.xq: [XPST0003] Unexpected end of query: 'with syntax err...'.
Liam