Class TemplateAssertionException

  • All Implemented Interfaces:
    java.io.Serializable

    public class TemplateAssertionException
    extends java.lang.RuntimeException

    Exception raised when a template assertion is not valid.

    In the Standard Dialects, this exception might be raised by the th:assert attribute.

    Since:
    2.1.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TemplateAssertionException​(java.lang.String assertionExpression, java.lang.String templateName)  
      TemplateAssertionException​(java.lang.String assertionExpression, java.lang.String templateName, int line, int col)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String createMessage​(java.lang.String assertionExpression, java.lang.String templateName, java.lang.Integer line, java.lang.Integer col)  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ASSERTION_MESSAGE

        private static final java.lang.String ASSERTION_MESSAGE
        See Also:
        Constant Field Values
      • ASSERTION_MESSAGE_LINE_COL

        private static final java.lang.String ASSERTION_MESSAGE_LINE_COL
        See Also:
        Constant Field Values
    • Constructor Detail

      • TemplateAssertionException

        public TemplateAssertionException​(java.lang.String assertionExpression,
                                          java.lang.String templateName,
                                          int line,
                                          int col)
      • TemplateAssertionException

        public TemplateAssertionException​(java.lang.String assertionExpression,
                                          java.lang.String templateName)
    • Method Detail

      • createMessage

        private static java.lang.String createMessage​(java.lang.String assertionExpression,
                                                      java.lang.String templateName,
                                                      java.lang.Integer line,
                                                      java.lang.Integer col)