public class MongoCommandException extends MongoServerException
TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL| Constructor and Description |
|---|
MongoCommandException(BsonDocument response,
ServerAddress address)
Construct a new instance with the CommandResult from a failed command
|
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode()
Gets the error code associated with the command failure.
|
java.lang.String |
getErrorCodeName()
Gets the name associated with the error code.
|
java.lang.String |
getErrorMessage()
Gets the error message associated with the command failure.
|
BsonDocument |
getResponse()
For internal use only.
|
getServerAddressaddLabel, fromThrowable, fromThrowableNonNull, getCode, getErrorLabels, hasErrorLabel, removeLabelpublic MongoCommandException(BsonDocument response, ServerAddress address)
response - the command responseaddress - the address of the server that generated the responsepublic int getErrorCode()
public java.lang.String getErrorCodeName()
public java.lang.String getErrorMessage()
public BsonDocument getResponse()
Copyright © 2010 - 2023 Adobe. All Rights Reserved