Enum Class ParseErrorCode

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

public enum ParseErrorCode extends Enum<ParseErrorCode>
Symbolic constants for syntax errors and other types of errors in a Klojang template.
Author:
Ayco Holleman
See Also:
  • Enum Constant Details

    • DUPLICATE_TMPL_NAME

      public static final ParseErrorCode DUPLICATE_TMPL_NAME
      The template contained two or more nested templates with the same name.
    • ILLEGAL_TMPL_NAME

      public static final ParseErrorCode ILLEGAL_TMPL_NAME
      The template contained a nested template with an illegal name.
    • ILLEGAL_VAR_PREFIX

      public static final ParseErrorCode ILLEGAL_VAR_PREFIX
      The template contained a variable with an illegal group name prefix (most likely "begin" or "end").
    • VAR_WITH_TMPL_NAME

      public static final ParseErrorCode VAR_WITH_TMPL_NAME
      The template contained a variable with the same name as a nested template.
    • NO_PLACEHOLDER_DEFINED

      public static final ParseErrorCode NO_PLACEHOLDER_DEFINED
      A template variable had the predefined def: prefix, but no placeholder value was specified in the template. If you want to use the def: prefix, you must also provide a placeholder value. For example: ~%def:firstName%John<!--%-->.
    • INVALID_INCLUDE_PATH

      public static final ParseErrorCode INVALID_INCLUDE_PATH
      The path specified in an included template (e.g. ~%%include:/path/to/foo.html%%) could not be resolved to a readable resource.
      See Also:
    • BEGIN_TAG_NOT_TERMINATED

      public static final ParseErrorCode BEGIN_TAG_NOT_TERMINATED
      The character sequence ~%%begin: was found, but no terminating percentage-sign (%) followed.
    • END_TAG_NOT_TERMINATED

      public static final ParseErrorCode END_TAG_NOT_TERMINATED
      The character sequence ~%%end: was found, but no terminating percentage-sign (%) followed.
    • INCLUDE_TAG_NOT_TERMINATED

      public static final ParseErrorCode INCLUDE_TAG_NOT_TERMINATED
      The character sequence ~%%include: was found, but no terminating %% followed.
    • MISSING_END_TAG

      public static final ParseErrorCode MISSING_END_TAG
      An inline template did not close properly. For example ~%%begin:foo% was found, but ~%%end:foo% was not.
    • DANGLING_END_TAG

      public static final ParseErrorCode DANGLING_END_TAG
      A dangling end-of-template was found. For example ~%%end:foo% was found, but not preceded by ~%%begin:foo%.
    • DITCH_BLOCK_NOT_CLOSED

      public static final ParseErrorCode DITCH_BLOCK_NOT_CLOSED
      A ditch block was not closed. (There was an uneven number of <!--%%--> tokens.)
    • PLACEHOLDER_NOT_CLOSED

      public static final ParseErrorCode PLACEHOLDER_NOT_CLOSED
      A placeholder block was not closed. (There was an uneven number of <!--%--> tokens.)
  • Method Details

    • values

      public static ParseErrorCode[] 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 ParseErrorCode 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