Enum Class RenderErrorCode

java.lang.Object
java.lang.Enum<RenderErrorCode>
org.klojang.templates.RenderErrorCode
All Implemented Interfaces:
Serializable, Comparable<RenderErrorCode>, Constable

public enum RenderErrorCode extends Enum<RenderErrorCode>
Symbolic constants for errors that may occur while populating or rendering a template.
Author:
Ayco Holleman
See Also:
  • Enum Constant Details

    • NO_SUCH_VARIABLE

      public static final RenderErrorCode NO_SUCH_VARIABLE
      A non-existent variable name was specified when calling RenderSession.set(), or other methods taking a variable name as argument.
    • NO_SUCH_TEMPLATE

      public static final RenderErrorCode NO_SUCH_TEMPLATE
      A non-existent nested template name was specified.
    • NO_CHILD_SESSIONS

      public static final RenderErrorCode NO_CHILD_SESSIONS
      The child sessions for a nested template were requested, but none were created yet.
      See Also:
    • ACCESS_EXCEPTION

      public static final RenderErrorCode ACCESS_EXCEPTION
      An error occurred while retrieving the value for a template variable.
    • NOT_TEXT_ONLY

      public static final RenderErrorCode NOT_TEXT_ONLY
      RenderSession.enable() was called on a nested template, but it was not a text-only template.
      See Also:
    • NOT_ONE_VAR_TEMPLATE

      public static final RenderErrorCode NOT_ONE_VAR_TEMPLATE
      RenderSession.populate1() was called on a nested template, but it was not a template with exactly one variable.
      See Also:
    • NOT_TWO_VAR_TEMPLATE

      public static final RenderErrorCode NOT_TWO_VAR_TEMPLATE
      RenderSession.populate2() was called on a nested template, but it was not a template with exactly two variables.
      See Also:
    • STRINGIFIER_RETURNED_NULL

      public static final RenderErrorCode STRINGIFIER_RETURNED_NULL
      A stringifier's stringify method returned null, but stringifiers must never return null.
    • STRINGIFIER_NOT_NULL_RESISTANT

      public static final RenderErrorCode STRINGIFIER_NOT_NULL_RESISTANT
      A stringifier's stringify method threw a NullPointerException, but stringifiers must be capable of stringifying null.
    • REPETITIONS_FIXED

      public static final RenderErrorCode REPETITIONS_FIXED
      A call to RenderSession.repeat() was made, but the number of repetitions had already been fixed, either by a previous call to repeat(), or implicitly, via the popupate() method.
    • REPETITION_MISMATCH

      public static final RenderErrorCode REPETITION_MISMATCH
      The number of elements in the array or Collection passed to RenderSession.populate() differed from the number of repetitions fixed by the first call to populate() or repeat().
    • UNEXPECTED_ERROR

      public static final RenderErrorCode UNEXPECTED_ERROR
      An unexpected error occurred while rendering the template.
  • Method Details

    • values

      public static RenderErrorCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RenderErrorCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null