public class WriteConcernException extends MongoException
MongoException.CursorNotFound, MongoException.DuplicateKey, MongoException.Network
Constructor and Description |
---|
WriteConcernException(CommandResult commandResult)
Construct a new instance with the CommandResult from getlasterror command
|
Modifier and Type | Method and Description |
---|---|
CommandResult |
getCommandResult()
Gets the getlasterror command result document.
|
getCode
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public WriteConcernException(CommandResult commandResult)
commandResult
- the command resultpublic CommandResult getCommandResult()