Daniel Barclay (Drill/MapR) created DRILL-2213:
--------------------------------------------------

             Summary: JSON parsing error message doesn't give file name or 
context of error
                 Key: DRILL-2213
                 URL: https://issues.apache.org/jira/browse/DRILL-2213
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Daniel Barclay (Drill/MapR)


The error message resulting from trying to read this ill-formed JSON (from a 
local file): 

  {
   "key":"abc"
   "a1":1,
  }

doesn't say anything about where the error was:

  org.apache.drill.exec.rpc.RpcException: RemoteRpcException: Failure while 
running fragment., Unexpected character ('"' (code 34)): was expecting comma to 
separate OBJECT entries

At absolute minimum, it should include the name of the file or a quote of the 
text surrounding the error.

It should include:
- the name of the file
- the line and column within the file, and/or a byte (or character) offset
- some of the text surrounding the error 
- (the "Unexpected ... expecting ..." part it already includes.


(Note:  The "code" in "code 34" is ambiguous.  "Code point" or "character 
number" would be better.  

Actually, the report of the character should include the standard (or just 
conventional?) Unicode hex notation ("U+0022").  (Including the decimal value 
too is fine, but that should probably be labeled as decimal, perhaps as ... 
"U+0022 (34 decimal)".)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to