Class GetOperationFailedException

All Implemented Interfaces:
Serializable, HasFriendlyErrorMessage

public class GetOperationFailedException extends AnchorFriendlyCheckedException
When a get operation fails for a particular key.
Author:
Owen Feehan
See Also:
  • Constructor Details

    • GetOperationFailedException

      public GetOperationFailedException(Exception cause)
      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

      public GetOperationFailedException(int key, String message)
      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

      public GetOperationFailedException(String key, String message)
      Creates with a message, but no cause - with a String key.
      Parameters:
      key - the key that was used in the operation that created this exception.
      message - a message describing the failure.
    • GetOperationFailedException

      public GetOperationFailedException(int key, Throwable cause)
      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

      public GetOperationFailedException(String key, Throwable cause)
      Creates with a cause, but no message - with a String key.
      Parameters:
      key - the key that was used in the operation that created this exception.
      cause - the cause of the failure.
  • Method Details

    • asOperationFailedException

      public OperationFailedException asOperationFailedException()
      Converts to a OperationFailedException using an identical message.

      Any cause and key information is discarded.

      Returns:
      the converted exception.
    • getKey

      public String getKey()
      The key that was used in the operation that created this exception.
    • getMessage

      public String getMessage()
      A message describing the failure.
      Overrides:
      getMessage in class Throwable