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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.util.exception.SeverityAwareException
SeverityAwareException.Severity
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
User-friendly message in system locale.protected LocalizableMessage
User-friendly localizable detail message. -
Constructor Summary
ConstructorDescriptionCommonException
(LocalizableMessage userFriendlyMessage) CommonException
(LocalizableMessage userFriendlyMessage, Throwable cause) CommonException
(String technicalMessage) CommonException
(String technicalMessage, ExceptionContext context) CommonException
(String technicalMessage, Throwable cause) CommonException
(String technicalMessage, Throwable cause, LocalizableMessage userFriendlyMessage) CommonException
(Throwable cause) -
Method Summary
Modifier and TypeMethodDescription@Nullable ExceptionContext
abstract String
Returns a human-readable message that describes the type or class of errors that the exception represents.User-friendly (localizable) message that describes this error.void
setLocalizedUserFriendlyMessage
(String localizedUserFriendlyMessage) void
setTechnicalMessage
(String technicalMessage) toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.util.exception.SeverityAwareException
getSeverity
-
Field Details
-
userFriendlyMessage
User-friendly localizable detail message. -
localizedUserFriendlyMessage
User-friendly message in system locale. This value should correspond to userFriendlyMessage translated into system locale.
-
-
Constructor Details
-
CommonException
public CommonException() -
CommonException
-
CommonException
-
CommonException
-
CommonException
-
CommonException
-
CommonException
-
CommonException
public CommonException(String technicalMessage, Throwable cause, LocalizableMessage userFriendlyMessage)
-
-
Method Details
-
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
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
- Overrides:
getMessage
in classThrowable
-
getLocalizedMessage
- Overrides:
getLocalizedMessage
in classThrowable
-
getTechnicalMessage
-
setTechnicalMessage
-
getLocalizedUserFriendlyMessage
-
setLocalizedUserFriendlyMessage
-
getContext
- Specified by:
getContext
in interfaceExceptionContextAware
-
toString
-