}
catch( StandardException se ) {
throw se;
}
catch( TokenStreamRecognitionException tsre ) {
RecognitionException re = tsre.recog;
if( null != re ) {
int lineNumber = re.getLine();
String line = TextUtil.getLine( currentContent, lineNumber-1 );
if( Standard.EMPTY == line ) {
throw new TemplateParserException( TemplateParserException.CODE_syntax_error, re.getMessage() );
}
else {
throw new TemplateParserException( TemplateParserException.CODE_syntax_error, line );
}
}