wrap IllegalDataException in SQLException

Parsing literals can throw IllegalDataException, which should be wrapped as
SQLExceptions.

#562