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
,ExpressionEvaluationException
,ObjectAlreadyExistsException
,ObjectNotFoundException
,PolicyViolationException
,PrismContainerValue.RemovedItemDefinitionException
,SchemaException
,SecurityViolationException
Superclass for all common midPoint exceptions.
- Author:
- Radovan Semancik
- See Also:
-
Nested Class Summary
-
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, Throwable cause) CommonException
(String technicalMessage, Throwable cause, LocalizableMessage userFriendlyMessage) CommonException
(Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionabstract String
Returns a human-readable message that describes the type or class of errors that the exception represents.Not all exceptions are fatal.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
-
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
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
-
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
-