reactivemongo.core.commands

LastError

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.LastError 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 exceptionWrapper
  2. by any2stringadd
  3. by any2stringfmt
  4. by any2ArrowAssoc
  5. by any2Ensuring
  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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

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

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

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

    The error code, if any

    The error code, if any

    Definition Classes
    LastErrorDatabaseException
  11. def elements: Stream[(String, BSONValue)]

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

  12. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (LastError) ⇒ Boolean): LastError

    Implicit information
    This member is added by an implicit conversion from LastError to Ensuring[LastError] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): LastError

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

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

    The err field, if any

  18. val errMsg: Option[String]

    The message (often regarding an error) if any

  19. def fillInStackTrace(): Throwable

    Definition Classes
    Throwable
  20. def finalize(): Unit

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

    Implicit information
    This member is added by an implicit conversion from LastError to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  22. 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.

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

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

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

  26. def getCause(): Throwable

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

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

    Definition Classes
    Throwable
  29. def getMessage(): String

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

    Definition Classes
    Throwable
  31. def getStackTraceString: String

    Implicit information
    This member is added by an implicit conversion from LastError to RichException performed by method exceptionWrapper in scala.Predef.
    Definition Classes
    RichException
  32. 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.

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

  34. lazy val inError: Boolean

    States if the last operation ended up with an error

  35. def initCause(arg0: Throwable): Throwable

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

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

    Tells if this error is related to authentication issues.

    Tells if this error is related to authentication issues.

    Definition Classes
    DatabaseException
  39. lazy val message: String

    Definition Classes
    LastErrorReactiveMongoException
  40. def n: Int

    Alias for updated to also support the short MongoDB syntax

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

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

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

    Definition Classes
    AnyRef
  44. val ok: Boolean

    True if the last operation was successful

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

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

    Definition Classes
    Throwable
  48. def printStackTrace(): Unit

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

    Definition Classes
    Throwable
  50. def stream: Stream[Try[(String, BSONValue)]]

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

  51. lazy val stringify: String

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

    Definition Classes
    AnyRef
  53. def toString(): String

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

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

  55. val updatedExisting: Boolean

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

  56. final def wait(): Unit

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

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

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

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

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from LastError to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (lastError: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from LastError to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (lastError: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: LastError

    Implicit information
    This member is added by an implicit conversion from LastError to ArrowAssoc[LastError] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (lastError: ArrowAssoc[LastError]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: LastError

    Implicit information
    This member is added by an implicit conversion from LastError to Ensuring[LastError] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (lastError: Ensuring[LastError]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

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 exceptionWrapper from LastError to RichException

Inherited by implicit conversion any2stringadd from LastError to StringAdd

Inherited by implicit conversion any2stringfmt from LastError to StringFormat

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

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

Ungrouped