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
public WriteConcernException(CommandResult commandResult)
commandResult
- the command resultpublic CommandResult getCommandResult()