com.mongodb
Class CommandFailureException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.CommandFailureException
- All Implemented Interfaces:
- Serializable
public class CommandFailureException
- extends MongoException
An exception indicating a failed command.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
CommandFailureException
public CommandFailureException(CommandResult commandResult)
- Construct a new instance with the CommandResult from a failed command
- Parameters:
commandResult
- the result
getCommandResult
public CommandResult getCommandResult()
- Gets the getlasterror command result document.
- Returns:
- the command result