Package de.espirit.common
Class CheckedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.espirit.common.CheckedException
- All Implemented Interfaces:
de.espirit.common.LocalizableError
,Serializable
- Direct Known Subclasses:
AuthenticationException
,ElementDeletedException
,ElementMovedException
,LockException
,MaximumNumberOfSessionsExceededException
,ScheduleEntryRunningException
This class
CheckedException
and its subclasses are a form of Exception
that indicates conditionsthat a reasonable application might want to catch.- Since:
- 4.0.17
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for a checked exception.CheckedException
(String message) Constructor for a checked exception.CheckedException
(String message, Throwable cause) Constructor for a checked exception. -
Method Summary
Modifier and TypeMethodDescriptionReturn aMap
of contexts for the exception.@NotNull String
Return the error code for the exception.@NotNull String
getLocalizedMessage
(ResourceBundle bundle) Return a localized exception message.void
setErrorCode
(String errorCode) Set the error code for the exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.espirit.common.LocalizableError
isInfoOnly
-
Constructor Details
-
CheckedException
public CheckedException()Constructor for a checked exception.- Since:
- 4.0.17
-
CheckedException
Constructor for a checked exception.- Parameters:
message
- The message for the checked Exception- Since:
- 4.0.17
-
CheckedException
Constructor for a checked exception.- Parameters:
message
- The message for the checked Exceptioncause
- The cause of the checked Exception.- Since:
- 4.2.190800
-
-
Method Details
-
setErrorCode
Set the error code for the exception. The error code should be a unique identifier that may be localized using aResourceBundle
.- Parameters:
errorCode
- The error code for the exception- Since:
- 4.0.17
-
getErrorCode
Return the error code for the exception.- Specified by:
getErrorCode
in interfacede.espirit.common.LocalizableError
- Returns:
- The error code for the exception
- Since:
- 4.0.17
- See Also:
-
getLocalizedMessage
Return a localized exception message.- Specified by:
getLocalizedMessage
in interfacede.espirit.common.LocalizableError
- Parameters:
bundle
-ResourceBundle
that contains the localized message- Returns:
- The localized exception message
- Since:
- 4.0.17
-
getContext
Return aMap
of contexts for the exception.- Specified by:
getContext
in interfacede.espirit.common.LocalizableError
- Returns:
- A string:object map for the context of the exception
- Since:
- 4.0.17
-