public class DocumentNotFoundException
extends java.io.IOException
Modifier and Type | Field and Description |
---|---|
protected @Nullable Document |
document
The document that was not found.
|
Constructor and Description |
---|
DocumentNotFoundException()
Constructs an
DocumentNotFoundException with null as its error
detail message. |
DocumentNotFoundException(@Nullable Document document)
Construct a new
DocumentNotFoundException with the given document
as the document that was not found. |
DocumentNotFoundException(@Nullable java.lang.String message)
Constructs an
DocumentNotFoundException with the specified detail message. |
DocumentNotFoundException(@Nullable java.lang.String message,
@Nullable Document document)
Construct a new
DocumentNotFoundException with the given document
as the document that was not found and with the given message . |
DocumentNotFoundException(@Nullable java.lang.String message,
@Nullable java.lang.Throwable cause)
Constructs an
DocumentNotFoundException with the specified detail message
and cause. |
DocumentNotFoundException(@Nullable java.lang.String message,
@Nullable java.lang.Throwable cause,
@Nullable Document document)
Construct a new
DocumentNotFoundException with the given document
as the document that was not found and with the given message and cause . |
DocumentNotFoundException(@Nullable java.lang.Throwable cause)
Constructs an
DocumentNotFoundException with the specified cause and a
detail message of (cause==null ? null : cause.toString()) (which typically
contains the class and detail message of cause ). |
DocumentNotFoundException(@Nullable java.lang.Throwable cause,
@Nullable Document document)
Construct a new
DocumentNotFoundException with the given document
as the document that was not found and with the given cause . |
Modifier and Type | Method and Description |
---|---|
@Nullable Document |
getDocument()
Return the document that was about to be read but was not found and caused this
exception to be thrown.
|
@Nullable protected @Nullable Document document
public DocumentNotFoundException()
DocumentNotFoundException
with null
as its error
detail message.public DocumentNotFoundException(@Nullable @Nullable java.lang.String message)
DocumentNotFoundException
with the specified detail message.message
- The detail message (which is saved for later retrieval by the Throwable.getMessage()
method)public DocumentNotFoundException(@Nullable @Nullable java.lang.String message, @Nullable @Nullable java.lang.Throwable cause)
DocumentNotFoundException
with the specified detail message
and cause.
Note that the detail message associated with cause
is
not automatically incorporated into this exception's detail
message.
message
- The detail message (which is saved for later retrieval by the Throwable.getMessage()
method)cause
- The cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null value is permitted, and indicates
that the cause is nonexistent or unknown.)public DocumentNotFoundException(@Nullable @Nullable java.lang.Throwable cause)
DocumentNotFoundException
with the specified cause and a
detail message of (cause==null ? null : cause.toString())
(which typically
contains the class and detail message of cause
). This constructor is useful
for IO exceptions that are little more than wrappers for other throwables.cause
- The cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null value is permitted, and indicates that
the cause is nonexistent or unknown.)public DocumentNotFoundException(@Nullable @Nullable Document document)
DocumentNotFoundException
with the given document
as the document that was not found.document
- the document that was not found.public DocumentNotFoundException(@Nullable @Nullable java.lang.String message, @Nullable @Nullable Document document)
DocumentNotFoundException
with the given document
as the document that was not found and with the given message
.message
- The detail message (which is saved for later retrieval by the
Throwable.getMessage()
method)document
- the document that was not found.public DocumentNotFoundException(@Nullable @Nullable java.lang.String message, @Nullable @Nullable java.lang.Throwable cause, @Nullable @Nullable Document document)
DocumentNotFoundException
with the given document
as the document that was not found and with the given message
and cause
.message
- The detail message (which is saved for later retrieval by the
Throwable.getMessage()
method)cause
- The cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null value is permitted, and indicates
that the cause is nonexistent or unknown.)document
- the document that was not found.public DocumentNotFoundException(@Nullable @Nullable java.lang.Throwable cause, @Nullable @Nullable Document document)
DocumentNotFoundException
with the given document
as the document that was not found and with the given cause
.cause
- The cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null value is permitted, and indicates
that the cause is nonexistent or unknown.)document
- the document that was not found.@Nullable @Contract(pure=true) public @Nullable Document getDocument()
null
if unknown or
non-existing.