Serializable
MongoCursorNotFoundException
public class MongoQueryException extends MongoServerException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
Constructor | Description |
---|---|
MongoQueryException(MongoCommandException commandException) |
Construct an instance from a command exception.
|
MongoQueryException(ServerAddress address,
int errorCode,
String errorMessage) |
Construct an instance.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getErrorCode() |
Gets the error code for this query failure.
|
String |
getErrorMessage() |
Gets the error message for this query failure.
|
addLabel, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
getServerAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MongoQueryException(ServerAddress address, int errorCode, String errorMessage)
address
- the server addresserrorCode
- the error codeerrorMessage
- the error messagepublic MongoQueryException(MongoCommandException commandException)
commandException
- the command exceptionpublic int getErrorCode()
public String getErrorMessage()