Class DataStoreException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BlobNotFoundException

public class DataStoreException extends FrameworkException
An exception indicating a problem with a data store. Generally, this should be used for exceptions emitted from the data store itself and for wrapping IOException as it typically represents an issue accessing the content in the data store. However, other Java exceptions should be left unchanged.
See Also:
  • Constructor Details

    • DataStoreException

      public DataStoreException(String message, Throwable cause)
      Constructs a new data store exception with the given message.
      Parameters:
      message - the reason for the failure
      cause - the underlying exception causing this failure
    • DataStoreException

      public DataStoreException(String message)
      Constructs a new data store exception with the given message.
      Parameters:
      message - the reason for the failure
  • Method Details

    • wrap

      public static DataStoreException wrap(IOException exception, Container container)
      Wraps an I/O exception into a unchecked data store exception.
      Parameters:
      exception - the I/O exception
      container - the container that was being accessed
      Returns:
      the unchecked data store exception
    • wrap

      public static DataStoreException wrap(IOException exception, Blob blob)
      Wraps an I/O exception into a unchecked data store exception.
      Parameters:
      exception - the I/O exception
      blob - the blob that was being accessed
      Returns:
      the unchecked data store exception