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 addSuppressed(arg0: Throwable): Unit

    Definition Classes
    Throwable
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

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

    The error code, if any

    The error code, if any

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

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

  11. 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
  12. 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
  13. 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
  14. 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
  15. final def eq(arg0: AnyRef): Boolean

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

    The err field, if any

  17. val errMsg: Option[String]

    The message (often regarding an error) if any

  18. def fillInStackTrace(): Throwable

    Definition Classes
    Throwable
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. 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()
  21. 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.

  22. 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.

  23. 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.

  24. 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.

  25. def getCause(): Throwable

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

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

    Definition Classes
    Throwable
  28. def getMessage(): String

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

    Definition Classes
    Throwable
  30. final def getSuppressed(): Array[Throwable]

    Definition Classes
    Throwable
  31. 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.

  32. 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.

  33. lazy val inError: Boolean

    States if the last operation ended up with an error

  34. def initCause(arg0: Throwable): Throwable

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

    Definition Classes
    Any
  36. 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
  37. def isUnauthorized: Boolean

    Tells if this error is related to authentication issues.

    Tells if this error is related to authentication issues.

    Definition Classes
    DatabaseException
  38. lazy val message: String

    explanation message

    explanation message

    Definition Classes
    LastErrorReactiveMongoException
  39. def n: Int

    Alias for updated to also support the short MongoDB syntax

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

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

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

    Definition Classes
    AnyRef
  43. val ok: Boolean

    True if the last operation was successful

  44. 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
  45. def printStackTrace(arg0: PrintWriter): Unit

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

    Definition Classes
    Throwable
  47. def printStackTrace(): Unit

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

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

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

  50. lazy val stringify: String

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

    Definition Classes
    AnyRef
  52. def toString(): String

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

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

  54. val updatedExisting: Boolean

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

  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. 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