This is a bit an off-the-wall request but I figured it doesn't hurt to throw out here as an idea.
When I have an error in my query I typically get a BaseXException saying something like:
org.basex.core.BaseXException: Stopped at line 42, column 55: [XPST0003] Expecting ")", found """.
However, it doesn't show me the query. Since I generate (sometimes large) queries automatically, this message by itself is not always very helpful (to put it very mildly). Either I print all my queries in their entirety, something that results in a dazzling amount of output. Or I jump through some hoops and try to keep my last query so it can be printed alongside the exception. Both are not very satisfactory solutions.
I was thinking though how nice it would be if the exception could print the query for me. And the icing on the cake would be if (in the above example) it would print an extra line just after line 42 with 54 spaces and ^ at column 55, so I get an arrow pointing out where the error is without me having to count to 42 first and then to 55.
Whatcha all think?
Personally, I think it's such a good idea I was thinking of doing it myself. If the BaseX6.3 source were available, that is.
Mark Boon