Class CommonException

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

public abstract class CommonException extends Exception implements SeverityAwareException, ExceptionContextAware
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

  • 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)
    • getContext

      @Nullable public @Nullable ExceptionContext getContext()
      Specified by:
      getContext in interface ExceptionContextAware
    • toString

      public String toString()
      Overrides:
      toString in class Throwable