public static ParseException convertParseException(net.sf.jsqlparser.parser.ParseException incomingException) { try { return new ParseException(new Token(incomingException.currentToken.kind, incomingException.currentToken.image), incomingException.expectedTokenSequences, incomingException.tokenImage); } catch (NullPointerException e1) { if (incomingException.getMessage().startsWith("Encountered \" \"(\" \"( \"\"")) { return new ParseException("Only one simple table name is supported."); } if (incomingException.getMessage().startsWith("Encountered unexpected token: \"=\" \"=\"")) { return new ParseException("unable to parse complete sql string. one reason for this is the use of double equals (==)."); } if (incomingException.getMessage().contains("Was expecting:" + LINE_SEPARATOR + " \"SELECT\"")) { return new ParseException("Only select statements are supported."); } if (incomingException.getMessage()!=null) { return new ParseException(incomingException.getMessage()); } return new ParseException("Count not parseNaturalLanguageDate query."); } }