public class MongoCommandException extends MongoException
MongoException.CursorNotFound, MongoException.DuplicateKey, MongoException.Network| Modifier and Type | Field and Description |
|---|---|
private CommandResult |
commandResult |
private static long |
serialVersionUID |
_code| Constructor and Description |
|---|
MongoCommandException(CommandResult commandResult) |
| Modifier and Type | Method and Description |
|---|---|
(package private) CommandResult |
getCommandResult() |
int |
getErrorCode()
Gets the error code associated with the command failure.
|
java.lang.String |
getErrorMessage()
Gets the error message associated with the command failure.
|
ServerAddress |
getServerAddress()
Gets the address of the server that this command failed on.
|
getCode, parseprivate static final long serialVersionUID
private final CommandResult commandResult
public MongoCommandException(CommandResult commandResult)
public ServerAddress getServerAddress()
public int getErrorCode()
public java.lang.String getErrorMessage()
CommandResult getCommandResult()