public class MongoCommandException extends MongoException
MongoException.CursorNotFound, MongoException.DuplicateKey, MongoException.Network| Constructor and Description |
|---|
MongoCommandException(CommandResult commandResult) |
| Modifier and Type | Method and Description |
|---|---|
int |
getErrorCode()
Gets the error code associated with the command failure.
|
String |
getErrorMessage()
Gets the error message associated with the command failure.
|
ServerAddress |
getServerAddress()
Gets the address of the server that this command failed on.
|
getCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic MongoCommandException(CommandResult commandResult)
public ServerAddress getServerAddress()
public int getErrorCode()
public String getErrorMessage()