public class WriteConcernException 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 |
|---|
WriteConcernException(CommandResult commandResult)
Deprecated.
for internal use only, this constructor will be removed in the next major release
|
WriteConcernException(int code,
CommandResult commandResult) |
| Modifier and Type | Method and Description |
|---|---|
CommandResult |
getCommandResult()
Deprecated.
Use either
getErrorMessage() or MongoException.getCode() or getServerAddress() |
java.lang.String |
getErrorMessage()
Gets the error message associated with the write failure.
|
ServerAddress |
getServerAddress()
Gets the address of the server that the write executed on.
|
getCode, parseprivate static final long serialVersionUID
private final CommandResult commandResult
@Deprecated public WriteConcernException(CommandResult commandResult)
commandResult - the command resultWriteConcernException(int code,
CommandResult commandResult)
public ServerAddress getServerAddress()
public java.lang.String getErrorMessage()
@Deprecated public CommandResult getCommandResult()
getErrorMessage() or MongoException.getCode() or getServerAddress()