Class CommonException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.evolveum.midpoint.util.exception.CommonException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CommunicationException, ConcurrencyException, ConfigurationException, EncryptionException, ExpressionEvaluationException, ObjectAlreadyExistsException, ObjectNotFoundException, PolicyViolationException, PrismContainerValue.RemovedItemDefinitionException, SchemaException, SecurityViolationException

public abstract class CommonException extends Exception
Superclass for all common midPoint exceptions.
Author:
Radovan Semancik
See Also:
  • Field Details

    • userFriendlyMessage

      protected LocalizableMessage userFriendlyMessage
      User-friendly localizable detail message.
    • localizedUserFriendlyMessage

      protected String localizedUserFriendlyMessage
      User-friendly message in system locale. This value should correspond to userFriendlyMessage translated into system locale.
  • Constructor Details

    • CommonException

      public CommonException()
    • CommonException

      public CommonException(String technicalMessage)
    • CommonException

      public CommonException(LocalizableMessage userFriendlyMessage)
    • CommonException

      public CommonException(Throwable cause)
    • CommonException

      public CommonException(String technicalMessage, Throwable cause)
    • CommonException

      public CommonException(LocalizableMessage userFriendlyMessage, Throwable cause)
    • CommonException

      public CommonException(String technicalMessage, Throwable cause, LocalizableMessage userFriendlyMessage)
  • Method Details

    • getErrorTypeMessage

      public abstract String getErrorTypeMessage()
      Returns a human-readable message that describes the type or class of errors that the exception represents. E.g. "Communication error", "Policy violation", etc. TODO: switch return value to a localized message
    • getUserFriendlyMessage

      public LocalizableMessage getUserFriendlyMessage()
      User-friendly (localizable) message that describes this error. The message is intended to be understood by user or system administrators. It should NOT contain any developer language (even if this is internal error).
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getLocalizedMessage

      public String getLocalizedMessage()
      Overrides:
      getLocalizedMessage in class Throwable
    • getTechnicalMessage

      public String getTechnicalMessage()
    • setTechnicalMessage

      public void setTechnicalMessage(String technicalMessage)
    • getLocalizedUserFriendlyMessage

      public String getLocalizedUserFriendlyMessage()
    • setLocalizedUserFriendlyMessage

      public void setLocalizedUserFriendlyMessage(String localizedUserFriendlyMessage)
    • getSeverity

      @Experimental @NotNull public CommonException.Severity getSeverity()
      Not all exceptions are fatal. This method returns the (estimated) severity of this exception. The final decision is up to the exception handling code, of course. It may or may not accept this value.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable