Enum Class LeguiExceptionTemplate

java.lang.Object
java.lang.Enum<LeguiExceptionTemplate>
com.spinyowl.legui.exception.LeguiExceptionTemplate
All Implemented Interfaces:
Serializable, Comparable<LeguiExceptionTemplate>, Constable

public enum LeguiExceptionTemplate extends Enum<LeguiExceptionTemplate>
Exception message templates. Used to build exception with predefined message.
  • Enum Constant Details

  • Method Details

    • values

      public static LeguiExceptionTemplate[] 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 LeguiExceptionTemplate 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
    • message

      public String message(String... args)
      Error message constructor.
      Parameters:
      args - error message variables.
      Returns:
      constructed message.
    • create

      public LeguiException create(String... args)
      Used to create LeguiException with specified message and provided variables.
      Parameters:
      args - error message variables.
      Returns:
      exception constructed with message template.
    • create

      public LeguiException create(Throwable e, String... args)
      Used to create LeguiException with specified message, Throwable cause and provided variables.
      Parameters:
      args - error message variables.
      e - throwable instance.
      Returns:
      exception constructed with message template.