reactivemongo.core.commands

LastError

Related Docs: object LastError | package commands

case class LastError(ok: Boolean, err: Option[String], code: Option[Int], errMsg: Option[String], originalDocument: Option[BSONDocument], updated: Int, updatedExisting: Boolean) extends Exception with DatabaseException with Product with Serializable

Result of the GetLastError command.

ok

True if the last operation was successful

err

The err field, if any

code

The error code, if any

errMsg

The message (often regarding an error) if any

originalDocument

The whole map resulting of the deserialization of the response with the DefaultBSONHandlers.

updated

The number of documents affected by last command, 0 if none

updatedExisting

When true, the last update operation resulted in change of existing documents

Annotations
@deprecated
Deprecated

(Since version 0.11.0) consider using reactivemongo.api.commands.WriteResult instead

Linear Supertypes
Serializable, Product, Equals, DatabaseException, ReactiveMongoException, Exception, Throwable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LastError
  2. Serializable
  3. Product
  4. Equals
  5. DatabaseException
  6. ReactiveMongoException
  7. Exception
  8. Throwable
  9. Serializable
  10. AnyRef
  11. Any
Implicitly
  1. by RichException
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LastError(ok: Boolean, err: Option[String], code: Option[Int], errMsg: Option[String], originalDocument: Option[BSONDocument], updated: Int, updatedExisting: Boolean)

    ok

    True if the last operation was successful

    err

    The err field, if any

    code

    The error code, if any

    errMsg

    The message (often regarding an error) if any

    originalDocument

    The whole map resulting of the deserialization of the response with the DefaultBSONHandlers.

    updated

    The number of documents affected by last command, 0 if none

    updatedExisting

    When true, the last update operation resulted in change of existing documents

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from LastError to any2stringadd[LastError] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (LastError, B)

    Implicit information
    This member is added by an implicit conversion from LastError to ArrowAssoc[LastError] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val code: Option[Int]

    The error code, if any

    The error code, if any

    Definition Classes
    LastErrorDatabaseException
  9. def elements: Stream[BSONElement]

    Returns a Stream for all the elements of the originalDocument if present, otherwise an empty Stream.

  10. def ensuring(cond: (LastError) ⇒ Boolean, msg: ⇒ Any): LastError

    Implicit information
    This member is added by an implicit conversion from LastError to Ensuring[LastError] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (LastError) ⇒ Boolean): LastError

    Implicit information
    This member is added by an implicit conversion from LastError to Ensuring[LastError] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: ⇒ Any): LastError

    Implicit information
    This member is added by an implicit conversion from LastError to Ensuring[LastError] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): LastError

    Implicit information
    This member is added by an implicit conversion from LastError to Ensuring[LastError] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. val err: Option[String]

    The err field, if any

  16. val errMsg: Option[String]

    The message (often regarding an error) if any

  17. def fillInStackTrace(): Throwable

    Definition Classes
    Throwable
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from LastError to StringFormat[LastError] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  20. def get(key: String): Option[BSONValue]

    Returns the BSONValue associated with the given key of the originalDocument.

    Returns the BSONValue associated with the given key of the originalDocument.

    If the key is not found or the matching value cannot be deserialized, returns None.

  21. def getAs[T](s: String)(implicit reader: BSONReader[_ <: BSONValue, T]): Option[T]

    Returns the BSONValue associated with the given key of the originalDocument, and converts it with the given implicit BSONReader.

    Returns the BSONValue associated with the given key of the originalDocument, and converts it with the given implicit BSONReader.

    If there is no matching value, or the value could not be deserialized or converted, returns a None.

  22. def getAsTry[T](s: String)(implicit reader: BSONReader[_ <: BSONValue, T]): Try[T]

    Returns the BSONValue associated with the given key of the originalDocument, and converts it with the given implicit BSONReader.

    Returns the BSONValue associated with the given key of the originalDocument, and converts it with the given implicit BSONReader.

    If there is no matching value, or the value could not be deserialized or converted, returns a Failure. The Failure holds a DocumentKeyNotFound if the key could not be found.

  23. def getAsUnflattenedTry[T](s: String)(implicit reader: BSONReader[_ <: BSONValue, T]): Try[Option[T]]

    Returns the BSONValue associated with the given key of the originalDocument, and converts it with the given implicit BSONReader.

    Returns the BSONValue associated with the given key of the originalDocument, and converts it with the given implicit BSONReader.

    If there is no matching value, returns a Success holding None. If the value could not be deserialized or converted, returns a Failure.

  24. def getCause(): Throwable

    Definition Classes
    Throwable
  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. def getLocalizedMessage(): String

    Definition Classes
    Throwable
  27. def getMessage(): String

    Definition Classes
    DatabaseExceptionReactiveMongoException → Throwable
  28. def getStackTrace(): Array[StackTraceElement]

    Definition Classes
    Throwable
  29. def getTry(key: String): Try[BSONValue]

    Returns the BSONValue BSONValue associated with the given key of the originalDocument.

    Returns the BSONValue BSONValue associated with the given key of the originalDocument.

    If the key is not found or the matching value cannot be deserialized, returns a Failure. The Failure holds a DocumentKeyNotFound if the key could not be found.

  30. def getUnflattenedTry(key: String): Try[Option[BSONValue]]

    Returns the BSONValue associated with the given key of the originalDocument.

    Returns the BSONValue associated with the given key of the originalDocument.

    If the key could not be found, the resulting option will be None. If the matching value could not be deserialized, returns a Failure.

  31. lazy val inError: Boolean

    States if the last operation ended up with an error

  32. def initCause(arg0: Throwable): Throwable

    Definition Classes
    Throwable
  33. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  34. def isNotAPrimaryError: Boolean

    Tells if this error is due to a write on a secondary node.

    Tells if this error is due to a write on a secondary node.

    Definition Classes
    DatabaseException
  35. def isUnauthorized: Boolean

    Tells if this error is related to authentication issues.

    Tells if this error is related to authentication issues.

    Definition Classes
    DatabaseException
  36. lazy val message: String

    explanation message

    explanation message

    Definition Classes
    LastErrorReactiveMongoException
  37. def n: Int

    Alias for updated to also support the short MongoDB syntax

  38. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  41. val ok: Boolean

    True if the last operation was successful

  42. val originalDocument: Option[BSONDocument]

    The whole map resulting of the deserialization of the response with the DefaultBSONHandlers.

    The whole map resulting of the deserialization of the response with the DefaultBSONHandlers.

    Definition Classes
    LastErrorDatabaseException
  43. def printStackTrace(arg0: PrintWriter): Unit

    Definition Classes
    Throwable
  44. def printStackTrace(arg0: PrintStream): Unit

    Definition Classes
    Throwable
  45. def printStackTrace(): Unit

    Definition Classes
    Throwable
  46. def setStackTrace(arg0: Array[StackTraceElement]): Unit

    Definition Classes
    Throwable
  47. def stream: Stream[Try[BSONElement]]

    Returns a Stream corresponding to the stream of the originalDocument if present, otherwise an empty Stream.

  48. lazy val stringify: String

  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  50. def toString(): String

    Definition Classes
    Throwable → AnyRef → Any
  51. val updated: Int

    The number of documents affected by last command, 0 if none

  52. val updatedExisting: Boolean

    When true, the last update operation resulted in change of existing documents

  53. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def [B](y: B): (LastError, B)

    Implicit information
    This member is added by an implicit conversion from LastError to ArrowAssoc[LastError] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def getStackTraceString: String

    Implicit information
    This member is added by an implicit conversion from LastError to RichException performed by method RichException in scala.Predef.
    Definition Classes
    RichException
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) Use Throwable#getStackTrace

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from DatabaseException

Inherited from ReactiveMongoException

Inherited from Exception

Inherited from Throwable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion RichException from LastError to RichException

Inherited by implicit conversion any2stringadd from LastError to any2stringadd[LastError]

Inherited by implicit conversion StringFormat from LastError to StringFormat[LastError]

Inherited by implicit conversion Ensuring from LastError to Ensuring[LastError]

Inherited by implicit conversion ArrowAssoc from LastError to ArrowAssoc[LastError]

Ungrouped