Search in sources :

Example 1 with ParseRuntimeException

use of org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException in project camel by apache.

the class TemplateParser method parseTemplate.

public Template parseTemplate(String template) {
    try {
        SSPTParser parser = new SSPTParser(new StringReader(template));
        Template ret = validate(parser.parse());
        return ret;
    } catch (ParseException parseException) {
        throw new ParseRuntimeException(parseException);
    }
}
Also used : StringReader(java.io.StringReader) SSPTParser(org.apache.camel.component.sql.stored.template.generated.SSPTParser) ParseRuntimeException(org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException) ParseException(org.apache.camel.component.sql.stored.template.generated.ParseException) Template(org.apache.camel.component.sql.stored.template.ast.Template)

Aggregations

StringReader (java.io.StringReader)1 ParseRuntimeException (org.apache.camel.component.sql.stored.template.ast.ParseRuntimeException)1 Template (org.apache.camel.component.sql.stored.template.ast.Template)1 ParseException (org.apache.camel.component.sql.stored.template.generated.ParseException)1 SSPTParser (org.apache.camel.component.sql.stored.template.generated.SSPTParser)1