Package com.mongodb
Class MongoQueryException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MongoCursorNotFoundException
An exception indicating that a query operation failed on the server.
- Since:
- 3.0
-
Field Summary
Fields inherited from class com.mongodb.MongoException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL
-
Constructor Summary
ConstructorDescriptionMongoQueryException
(MongoCommandException commandException) Deprecated.MongoQueryException
(ServerAddress address, int errorCode, String errorMessage) Deprecated.MongoQueryException
(ServerAddress address, int errorCode, String errorCodeName, String errorMessage) Deprecated.MongoQueryException
(BsonDocument response, ServerAddress serverAddress) Construct an instance. -
Method Summary
Methods inherited from class com.mongodb.MongoCommandException
getErrorCode, getErrorCodeName, getErrorMessage, getResponse
Methods inherited from class com.mongodb.MongoServerException
getServerAddress
Methods inherited from class com.mongodb.MongoException
addLabel, addLabels, addLabels, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabel
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MongoQueryException
Construct an instance.- Parameters:
response
- the server response documentserverAddress
- the server address- Since:
- 4.8
-
MongoQueryException
Deprecated.Construct an instance.- Parameters:
address
- the server addresserrorCode
- the error codeerrorMessage
- the error message
-
MongoQueryException
@Deprecated public MongoQueryException(ServerAddress address, int errorCode, @Nullable String errorCodeName, String errorMessage) Deprecated.Construct an instance.- Parameters:
address
- the server addresserrorCode
- the error codeerrorCodeName
- the error code nameerrorMessage
- the error message- Since:
- 4.6
-
MongoQueryException
Deprecated.Construct an instance from a command exception.- Parameters:
commandException
- the command exception- Since:
- 3.7
-
MongoQueryException(BsonDocument, ServerAddress)