public class CommandFailureException extends MongoException
MongoException.CursorNotFound, MongoException.DuplicateKey, MongoException.Network
Constructor and Description |
---|
CommandFailureException(CommandResult commandResult)
Construct a new instance with the CommandResult from a failed 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 CommandFailureException(CommandResult commandResult)
commandResult
- the resultpublic CommandResult getCommandResult()