Package org.anchoranalysis.core.index
Class GetOperationFailedException
Object
Throwable
Exception
AnchorCheckedException
AnchorFriendlyCheckedException
GetOperationFailedException
- All Implemented Interfaces:
Serializable,HasFriendlyErrorMessage
When a get operation fails for a particular key.
- Author:
- Owen Feehan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGetOperationFailedException(int key, String message) Creates with a message, but no cause - with an integer key.GetOperationFailedException(int key, Throwable cause) Creates with a cause, but no message - with an integer key.Creates with only a cause, omitting a key and a message.GetOperationFailedException(String key, String message) Creates with a message, but no cause - with aStringkey.GetOperationFailedException(String key, Throwable cause) Creates with a cause, but no message - with aStringkey. -
Method Summary
Modifier and TypeMethodDescriptionConverts to aOperationFailedExceptionusing an identical message.getKey()The key that was used in the operation that created this exception.A message describing the failure.Methods inherited from class org.anchoranalysis.core.exception.friendly.AnchorFriendlyCheckedException
friendlyMessage, friendlyMessageHierarchy, friendlyMessageHierarchy, stackTraceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
GetOperationFailedException
Creates with only a cause, omitting a key and a message.The key is instead stored as an empty string.
- Parameters:
cause- the cause.
-
GetOperationFailedException
Creates with a message, but no cause - with an integer key.- Parameters:
key- the key that was used in the operation that created this exception.message- a message describing the failure.
-
GetOperationFailedException
Creates with a message, but no cause - with aStringkey.- Parameters:
key- the key that was used in the operation that created this exception.message- a message describing the failure.
-
GetOperationFailedException
Creates with a cause, but no message - with an integer key.- Parameters:
key- the key that was used in the operation that created this exception.cause- the cause of the failure.
-
GetOperationFailedException
Creates with a cause, but no message - with aStringkey.- Parameters:
key- the key that was used in the operation that created this exception.cause- the cause of the failure.
-
-
Method Details
-
asOperationFailedException
Converts to aOperationFailedExceptionusing an identical message.Any cause and key information is discarded.
- Returns:
- the converted exception.
-
getKey
The key that was used in the operation that created this exception. -
getMessage
A message describing the failure.- Overrides:
getMessagein classThrowable
-