public class DocumentStoreException extends RuntimeException
DocumentStoreException is a runtime exception for
DocumentStore implementations to signal unexpected problems like
a communication exception.| Modifier and Type | Class and Description |
|---|---|
static class |
DocumentStoreException.Type |
| Constructor and Description |
|---|
DocumentStoreException(String message)
Creates a
DocumentStoreException.Type.GENERIC DocumentStoreException with the
given message. |
DocumentStoreException(String message,
Throwable cause)
Creates a
DocumentStoreException.Type.GENERIC DocumentStoreException with the
given message and cause. |
DocumentStoreException(String message,
Throwable cause,
DocumentStoreException.Type type)
Creates a
DocumentStoreException with the given message, cause
and type. |
DocumentStoreException(Throwable cause)
Creates a
DocumentStoreException.Type.GENERIC DocumentStoreException with the
given cause. |
| Modifier and Type | Method and Description |
|---|---|
static DocumentStoreException |
asDocumentStoreException(String message,
Throwable t,
DocumentStoreException.Type type,
Iterable<String> ids)
Converts the given
Throwable into a DocumentStoreException. |
static DocumentStoreException |
convert(@NotNull Throwable t)
|
static DocumentStoreException |
convert(@NotNull Throwable t,
Iterable<String> ids)
|
static DocumentStoreException |
convert(@NotNull Throwable t,
String msg)
|
DocumentStoreException.Type |
getType() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic DocumentStoreException(String message)
DocumentStoreException.Type.GENERIC DocumentStoreException with the
given message.message - the exception message.public DocumentStoreException(Throwable cause)
DocumentStoreException.Type.GENERIC DocumentStoreException with the
given cause. The message of the exception is the value returned by
cause.toString() if available, otherwise null.cause - the cause or null if nonexistent or unknown.public DocumentStoreException(String message, Throwable cause)
DocumentStoreException.Type.GENERIC DocumentStoreException with the
given message and cause.message - the exception message.cause - the cause or null if nonexistent or unknown.public DocumentStoreException(String message, Throwable cause, DocumentStoreException.Type type)
DocumentStoreException with the given message, cause
and type.message - the exception message.cause - the cause or null if nonexistent or unknown.type - the type of this exception.public static DocumentStoreException convert(@NotNull @NotNull Throwable t)
Throwable into a DocumentStoreException.Type.GENERIC
DocumentStoreException. If the Throwable is an instance
of DocumentStoreException this method returns the given
Throwable as is, otherwise it will be used as the cause of the
returned DocumentStoreException. The returned
DocumentStoreException will have the same message as the given
Throwable.t - a Throwable.DocumentStoreException.Type.GENERIC DocumentStoreException.public static DocumentStoreException convert(@NotNull @NotNull Throwable t, String msg)
Throwable into a DocumentStoreException.Type.GENERIC
DocumentStoreException. If the Throwable is an instance
of DocumentStoreException this method returns the given
Throwable as is, otherwise it will be used as the cause of the
returned DocumentStoreException. The returned
DocumentStoreException will have the given message, unless the
Throwable already is a DocumentStoreException.t - a Throwable.msg - a message for the DocumentStoreException.DocumentStoreException.Type.GENERIC DocumentStoreException.public static DocumentStoreException convert(@NotNull @NotNull Throwable t, Iterable<String> ids)
Throwable into a DocumentStoreException.Type.GENERIC
DocumentStoreException. If the Throwable is an instance
of DocumentStoreException this method returns the given
Throwable as is, otherwise it will be used as the cause of the
returned DocumentStoreException. The returned
DocumentStoreException will have the same message as the given
Throwable appended with the list of ids.t - a Throwable.ids - a list of DocumentStore IDs associated with the
operation that triggered this exception.DocumentStoreException.Type.GENERIC DocumentStoreException.public static DocumentStoreException asDocumentStoreException(String message, Throwable t, DocumentStoreException.Type type, Iterable<String> ids)
Throwable into a DocumentStoreException.
If the Throwable is an instance of DocumentStoreException
this method returns the given Throwable as is, otherwise it will
be used as the cause of the returned DocumentStoreException.
The ids will be appended to the given message and used
for the returned DocumentStoreException.message - a message for the DocumentStoreException.t - a Throwable.type - the type of this exception.ids - a list of DocumentStore IDs associated with the
operation that triggered this exception.DocumentStoreException.Type.GENERIC DocumentStoreException.public DocumentStoreException.Type getType()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.