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
,ScriptExecutionException
,SecurityViolationException
public abstract class CommonException extends Exception
Superclass for all common midPoint exceptions.- Author:
- Radovan Semancik
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
localizedUserFriendlyMessage
User-friendly message in system locale.protected LocalizableMessage
userFriendlyMessage
User-friendly localizable detail message.
-
Constructor Summary
Constructors Constructor Description CommonException()
CommonException(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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
getErrorTypeMessage()
Returns a human-readable message that describes the type or class of errors that the exception represents.String
getLocalizedMessage()
String
getLocalizedUserFriendlyMessage()
String
getMessage()
String
getTechnicalMessage()
LocalizableMessage
getUserFriendlyMessage()
User-friendly (localizable) message that describes this error.void
setLocalizedUserFriendlyMessage(String localizedUserFriendlyMessage)
void
setTechnicalMessage(String technicalMessage)
String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
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 Detail
-
CommonException
public CommonException()
-
CommonException
public CommonException(String technicalMessage)
-
CommonException
public CommonException(LocalizableMessage userFriendlyMessage)
-
CommonException
public CommonException(Throwable cause)
-
CommonException
public CommonException(LocalizableMessage userFriendlyMessage, Throwable cause)
-
CommonException
public CommonException(String technicalMessage, Throwable cause, LocalizableMessage userFriendlyMessage)
-
-
Method Detail
-
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 classThrowable
-
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessage
in classThrowable
-
getTechnicalMessage
public String getTechnicalMessage()
-
setTechnicalMessage
public void setTechnicalMessage(String technicalMessage)
-
getLocalizedUserFriendlyMessage
public String getLocalizedUserFriendlyMessage()
-
setLocalizedUserFriendlyMessage
public void setLocalizedUserFriendlyMessage(String localizedUserFriendlyMessage)
-
-