com.mongodb
Class WriteConcernException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mongodb.MongoException
com.mongodb.WriteConcernException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- MongoException.DuplicateKey
public class WriteConcernException
- extends MongoException
An exception representing an error reported due to a write failure.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
WriteConcernException
public WriteConcernException(CommandResult commandResult)
- Construct a new instance with the CommandResult from getlasterror command
- Parameters:
commandResult
- the command result
getCommandResult
public CommandResult getCommandResult()
- Gets the getlasterror command result document.
- Returns:
- the command result