Class DocumentStoreException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.jackrabbit.oak.plugins.document.DocumentStoreException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
RDBDocumentStore.UnsupportedIndexedPropertyException
public class DocumentStoreException extends java.lang.RuntimeExceptionDocumentStoreExceptionis a runtime exception forDocumentStoreimplementations to signal unexpected problems like a communication exception.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDocumentStoreException.Type
-
Constructor Summary
Constructors Constructor Description DocumentStoreException(java.lang.String message)Creates aDocumentStoreException.Type.GENERICDocumentStoreExceptionwith the given message.DocumentStoreException(java.lang.String message, java.lang.Throwable cause)Creates aDocumentStoreException.Type.GENERICDocumentStoreExceptionwith the given message and cause.DocumentStoreException(java.lang.String message, java.lang.Throwable cause, DocumentStoreException.Type type)Creates aDocumentStoreExceptionwith the given message, cause and type.DocumentStoreException(java.lang.Throwable cause)Creates aDocumentStoreException.Type.GENERICDocumentStoreExceptionwith the given cause.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DocumentStoreExceptionasDocumentStoreException(java.lang.String message, java.lang.Throwable t, DocumentStoreException.Type type, java.lang.Iterable<java.lang.String> ids)Converts the givenThrowableinto aDocumentStoreException.static DocumentStoreExceptionconvert(@NotNull java.lang.Throwable t)static DocumentStoreExceptionconvert(@NotNull java.lang.Throwable t, java.lang.Iterable<java.lang.String> ids)static DocumentStoreExceptionconvert(@NotNull java.lang.Throwable t, java.lang.String msg)DocumentStoreException.TypegetType()
-
-
-
Constructor Detail
-
DocumentStoreException
public DocumentStoreException(java.lang.String message)
Creates aDocumentStoreException.Type.GENERICDocumentStoreExceptionwith the given message.- Parameters:
message- the exception message.
-
DocumentStoreException
public DocumentStoreException(java.lang.Throwable cause)
Creates aDocumentStoreException.Type.GENERICDocumentStoreExceptionwith the given cause. The message of the exception is the value returned bycause.toString()if available, otherwisenull.- Parameters:
cause- the cause ornullif nonexistent or unknown.
-
DocumentStoreException
public DocumentStoreException(java.lang.String message, java.lang.Throwable cause)Creates aDocumentStoreException.Type.GENERICDocumentStoreExceptionwith the given message and cause.- Parameters:
message- the exception message.cause- the cause ornullif nonexistent or unknown.
-
DocumentStoreException
public DocumentStoreException(java.lang.String message, java.lang.Throwable cause, DocumentStoreException.Type type)Creates aDocumentStoreExceptionwith the given message, cause and type.- Parameters:
message- the exception message.cause- the cause ornullif nonexistent or unknown.type- the type of this exception.
-
-
Method Detail
-
convert
public static DocumentStoreException convert(@NotNull @NotNull java.lang.Throwable t)
Converts the givenThrowableinto aDocumentStoreException.Type.GENERICDocumentStoreException. If theThrowableis an instance ofDocumentStoreExceptionthis method returns the givenThrowableas is, otherwise it will be used as the cause of the returnedDocumentStoreException. The returnedDocumentStoreExceptionwill have the same message as the givenThrowable.- Parameters:
t- aThrowable.- Returns:
- a
DocumentStoreException.Type.GENERICDocumentStoreException.
-
convert
public static DocumentStoreException convert(@NotNull @NotNull java.lang.Throwable t, java.lang.String msg)
Converts the givenThrowableinto aDocumentStoreException.Type.GENERICDocumentStoreException. If theThrowableis an instance ofDocumentStoreExceptionthis method returns the givenThrowableas is, otherwise it will be used as the cause of the returnedDocumentStoreException. The returnedDocumentStoreExceptionwill have the given message, unless theThrowablealready is aDocumentStoreException.- Parameters:
t- aThrowable.msg- a message for theDocumentStoreException.- Returns:
- a
DocumentStoreException.Type.GENERICDocumentStoreException.
-
convert
public static DocumentStoreException convert(@NotNull @NotNull java.lang.Throwable t, java.lang.Iterable<java.lang.String> ids)
Converts the givenThrowableinto aDocumentStoreException.Type.GENERICDocumentStoreException. If theThrowableis an instance ofDocumentStoreExceptionthis method returns the givenThrowableas is, otherwise it will be used as the cause of the returnedDocumentStoreException. The returnedDocumentStoreExceptionwill have the same message as the givenThrowableappended with the list ofids.- Parameters:
t- aThrowable.ids- a list ofDocumentStoreIDs associated with the operation that triggered this exception.- Returns:
- a
DocumentStoreException.Type.GENERICDocumentStoreException.
-
asDocumentStoreException
public static DocumentStoreException asDocumentStoreException(java.lang.String message, java.lang.Throwable t, DocumentStoreException.Type type, java.lang.Iterable<java.lang.String> ids)
Converts the givenThrowableinto aDocumentStoreException. If theThrowableis an instance ofDocumentStoreExceptionthis method returns the givenThrowableas is, otherwise it will be used as the cause of the returnedDocumentStoreException. Theidswill be appended to the givenmessageand used for the returnedDocumentStoreException.- Parameters:
message- a message for theDocumentStoreException.t- aThrowable.type- the type of this exception.ids- a list ofDocumentStoreIDs associated with the operation that triggered this exception.- Returns:
- a
DocumentStoreException.Type.GENERICDocumentStoreException.
-
getType
public DocumentStoreException.Type getType()
- Returns:
- the type of this exception.
-
-