Closed vforchi closed 7 years ago
Actually, the parser is right. You are just using a forbidden character: a single quotation mark (i.e. ‘ or \u2018 in Unicode). I assume that this query is a copy-paste from either a PDF, an HTML page or a document like Word/OpenOffice/....
If you use a normal single quote ' instead, it should work.
Sorry, I didn't notice, it was a copy and paste form the ADQL specification. Shouldn't the parser fail more gracefully?
What do you mean?
I've to admit that the usage of an Error class is quite strong, but this will soon change ; a ParseException will be thrown instead.
But it would be actually very difficult to have a different error message....this one is generated from a parser tool that I am using (JavaCC). And Encountered: "\u2018"
gives a good guess that a weird character is the origin of the problem.
The problem is that the error is in the log file, server side. The user only gets this:
INTERNAL SERVER ERROR! Sorry, this error is grave and unexpected. No explanation can be provided for the moment. Details about this error have been reported in the service log files ; you should try again your request later or notify the administrator(s) by yourself (with the following REQ_ID).
Indeed. And it is linked to the fact that an Error instead of an Exception is thrown. As I said, I will change that soon ; once done, you should not have anymore this kind of message that easily ; it would be like a "normal" syntax error.
If I execute one of these queries:
(it's just to test my translator)
I get the following error on the console:
As far as I can see this has nothing to do with my translator, but it's in the ADQL parser itself.