public class MongoCommandException extends MongoServerException
| 构造器和说明 |
|---|
MongoCommandException(BsonDocument response,
ServerAddress address)
Construct a new instance with the CommandResult from a failed command
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getErrorCode()
Gets the error code associated with the command failure.
|
java.lang.String |
getErrorMessage()
Gets the error message associated with the command failure.
|
BsonDocument |
getResponse()
For internal use only.
|
getServerAddressfromThrowable, getCodepublic MongoCommandException(BsonDocument response, ServerAddress address)
response - the command responseaddress - the address of the server that generated the responsepublic int getErrorCode()
public java.lang.String getErrorMessage()
public BsonDocument getResponse()