com.mongodb
Class WriteConcernException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.mongodb.MongoException
                  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class com.mongodb.MongoException
MongoException.CursorNotFound, MongoException.DuplicateKey, MongoException.Network
 
Constructor Summary
WriteConcernException(CommandResult commandResult)
          Construct a new instance with the CommandResult from getlasterror command
 
Method Summary
 CommandResult getCommandResult()
          Gets the getlasterror command result document.
 
Methods inherited from class com.mongodb.MongoException
getCode
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WriteConcernException

public WriteConcernException(CommandResult commandResult)
Construct a new instance with the CommandResult from getlasterror command

Parameters:
commandResult - the command result
Method Detail

getCommandResult

public CommandResult getCommandResult()
Gets the getlasterror command result document.

Returns:
the command result