public void handleAutoOpenElementStart( final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) { throw new TemplateProcessingException("Parse exception during processing of inlining: auto-open not allowed in text mode"); }
private static TemplateProcessingException createRestrictedParameterAccessException() { return new TemplateProcessingException( "Access to request parameters is forbidden in this context. Note some restrictions apply to " + "variable access. For example, direct access to request parameters is forbidden in preprocessing and " + "unescaped expressions, in TEXT template mode, in fragment insertion specifications and " + "in some specific attribute processors."); }
public void handleOpenElementEnd( final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) { try { this.handler.handleOpenElementEnd(buffer, nameOffset, nameLen, line, col); } catch (final ParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public void handleAutoOpenElementStart( final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) { try { this.handler.handleAutoOpenElementStart(buffer, nameOffset, nameLen, line, col); } catch (final ParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public void handleCloseElementStart( final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) { try { this.handler.handleCloseElementStart(buffer, nameOffset, nameLen, line, col); } catch (final ParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public void handleStandaloneElementEnd( final char[] buffer, final int nameOffset, final int nameLen, final boolean minimized, final int line, final int col) { try { this.handler.handleStandaloneElementEnd(buffer, nameOffset, nameLen, minimized, line, col); } catch (final TextParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public void handleOpenElementEnd( final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) { try { this.handler.handleOpenElementEnd(buffer, nameOffset, nameLen, line, col); } catch (final TextParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public void handleCloseElementEnd( final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) { try { this.handler.handleCloseElementEnd(buffer, nameOffset, nameLen, line, col); } catch (final TextParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public String formatPercent(final Number target, final Integer minIntegerDigits, final Integer decimalDigits) { if (target == null) { return null; } try { return NumberUtils.formatPercent(target, minIntegerDigits, decimalDigits, this.locale); } catch (final Exception e) { throw new TemplateProcessingException("Error formatting percent", e); } }
public final void gatherComment(final IComment comment) { if (this.gatheringFinished) { throw new TemplateProcessingException("Gathering is finished already! We cannot gather more events"); } this.syntheticModel.add(comment); }
public final void gatherStandaloneElement(final IStandaloneElementTag standaloneElementTag) { if (this.gatheringFinished) { throw new TemplateProcessingException("Gathering is finished already! We cannot gather more events"); } this.syntheticModel.add(standaloneElementTag); if (this.modelLevel == 0) { this.gatheringFinished = true; } }
public final void gatherUnmatchedCloseElement(final ICloseElementTag closeElementTag) { if (this.gatheringFinished) { throw new TemplateProcessingException("Gathering is finished already! We cannot gather more events"); } this.syntheticModel.add(closeElementTag); }
public final void gatherProcessingInstruction(final IProcessingInstruction processingInstruction) { if (this.gatheringFinished) { throw new TemplateProcessingException("Gathering is finished already! We cannot gather more events"); } this.syntheticModel.add(processingInstruction); }
public void handleStandaloneElementStart( final char[] buffer, final int nameOffset, final int nameLen, final boolean minimized, final int line, final int col) { try { this.handler.handleStandaloneElementStart(buffer, nameOffset, nameLen, minimized, line, col); } catch (final ParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public void handleCloseElementStart( final char[] buffer, final int nameOffset, final int nameLen, final int line, final int col) { try { this.handler.handleCloseElementStart(buffer, nameOffset, nameLen, line, col); } catch (final TextParseException e) { throw new TemplateProcessingException("Parse exception during processing of inlining", e); } }
public String formatInteger(final Number target, final Integer minIntegerDigits) { if (target == null) { return null; } try { return NumberUtils.format(target, minIntegerDigits, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting integer with minimum integer digits = " + minIntegerDigits, e); } }
public String formatCurrency(final Number target) { if (target == null) { return null; } try { return NumberUtils.formatCurrency(target, this.locale); } catch (final Exception e) { throw new TemplateProcessingException("Error formatting currency", e); } }
public String format(final Date target) { if (target == null) { return null; } try { return DateUtils.format(target, this.locale); } catch (final Exception e) { throw new TemplateProcessingException( "Error formatting date with standard format for locale " + this.locale, e); } }
@Override public final String toString() { try { final Writer writer = new FastStringWriter(); write(writer); return writer.toString(); } catch (final IOException e) { throw new TemplateProcessingException( "Error while creating String representation of model"); } }
@Override public final String toString() { final Writer stringWriter = new FastStringWriter(); try { write(stringWriter); } catch (final IOException e) { throw new TemplateProcessingException("Exception while creating String representation of model entity", e); } return stringWriter.toString(); }