Class CheckedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
de.espirit.common.CheckedException
All Implemented Interfaces:
LocalizableError, Serializable
Direct Known Subclasses:
AuthenticationException, ElementDeletedException, ElementMovedException, LockException, MaximumNumberOfSessionsExceededException, ScheduleEntryRunningException

public class CheckedException extends Exception implements LocalizableError
This class CheckedException and its subclasses are a form of Exception that indicates conditionsthat a reasonable application might want to catch.
Since:
4.0.17
See Also:
  • Constructor Details

    • CheckedException

      public CheckedException()
      Constructor for a checked exception.
      Since:
      4.0.17
    • CheckedException

      public CheckedException(String message)
      Constructor for a checked exception.
      Parameters:
      message - The message for the checked Exception
      Since:
      4.0.17
    • CheckedException

      public CheckedException(String message, Throwable cause)
      Constructor for a checked exception.
      Parameters:
      message - The message for the checked Exception
      cause - The cause of the checked Exception.
      Since:
      4.2.190800
  • Method Details

    • setErrorCode

      public void setErrorCode(String errorCode)
      Set the error code for the exception.
      The error code should be a unique identifier that may be localized using a ResourceBundle.
      Parameters:
      errorCode - The error code for the exception
      Since:
      4.0.17
    • getErrorCode

      @NotNull public @NotNull String getErrorCode()
      Return the error code for the exception.
      Returns:
      The error code for the exception
      Since:
      4.0.17
      See Also:
    • getLocalizedMessage

      @NotNull public @NotNull String getLocalizedMessage(ResourceBundle bundle)
      Return a localized exception message.
      Parameters:
      bundle - ResourceBundle that contains the localized message
      Returns:
      The localized exception message
      Since:
      4.0.17
    • getContext

      @NotNull public @NotNull Map<String,Object> getContext()
      Return a Map of contexts for the exception.
      Returns:
      A string:object map for the context of the exception
      Since:
      4.0.17