Package de.espirit.common
Class CheckedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.espirit.common.CheckedException
- All Implemented Interfaces:
LocalizableError,Serializable
- Direct Known Subclasses:
AuthenticationException,ElementDeletedException,ElementMovedException,LockException,MaximumNumberOfSessionsExceededException,ScheduleEntryRunningException
This class
CheckedException and its subclasses are a form of Exception that indicates conditions
that 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 aMapof contexts for the exception.@NotNull StringReturn the error code for the exception.@NotNull StringgetLocalizedMessage(ResourceBundle bundle) Return a localized exception message.voidsetErrorCode(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
-
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.- Returns:
- The error code for the exception
- Since:
- 4.0.17
- See Also:
-
getLocalizedMessage
Return a localized exception message.- Parameters:
bundle-ResourceBundlethat contains the localized message- Returns:
- The localized exception message
- Since:
- 4.0.17
-
getContext
Return aMapof contexts for the exception.- Returns:
- A string:object map for the context of the exception
- Since:
- 4.0.17
-