use of org.apache.asterix.lang.aql.parser.ParseException in project asterixdb by apache.
the class AQLTestCase method testAQL.
@Test
public void testAQL() throws UnsupportedEncodingException, FileNotFoundException, ParseException, AsterixException, AlgebricksException {
Reader reader = new BufferedReader(new InputStreamReader(new FileInputStream(queryFile), "UTF-8"));
IParser parser = aqlParserFactory.createParser(reader);
GlobalConfig.ASTERIX_LOGGER.info(queryFile.toString());
try {
parser.parse();
} catch (Exception e) {
GlobalConfig.ASTERIX_LOGGER.warning("Failed while testing file " + reader);
StringWriter sw = new StringWriter();
PrintWriter writer = new PrintWriter(sw);
e.printStackTrace(writer);
GlobalConfig.ASTERIX_LOGGER.warning(sw.toString());
throw new ParseException("Parsing " + queryFile.toString());
}
}
Aggregations