Class/Object

reactivemongo.core.commands

LastError

Related Docs: object LastError | package commands

Permalink

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
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
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)

    Permalink

    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

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

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

    Permalink
    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)

    Permalink
    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

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def addSuppressed(arg0: Throwable): Unit

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

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

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

    Permalink

    The error code, if any

    The error code, if any

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

    Permalink

    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

    Permalink
    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

    Permalink
    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

    Permalink
    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

    Permalink
    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

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

    Permalink

    The err field, if any

  17. val errMsg: Option[String]

    Permalink

    The message (often regarding an error) if any

  18. def fillInStackTrace(): Throwable

    Permalink
    Definition Classes
    Throwable
  19. def finalize(): Unit

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

    Permalink
    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]

    Permalink

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

    Returns the reactivemongo.bson.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]

    Permalink

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

    Returns the reactivemongo.bson.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]

    Permalink

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

    Returns the reactivemongo.bson.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]]

    Permalink

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

    Returns the reactivemongo.bson.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

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

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

    Permalink
    Definition Classes
    Throwable
  28. def getMessage(): String

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

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

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

    Permalink

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

    Returns the reactivemongo.bson.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]]

    Permalink

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

    Returns the reactivemongo.bson.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

    Permalink

    States if the last operation ended up with an error

  34. def initCause(arg0: Throwable): Throwable

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

    Permalink
    Definition Classes
    Any
  36. def isNotAPrimaryError: Boolean

    Permalink

    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

    Permalink

    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

    Permalink

    explanation message

    explanation message

    Definition Classes
    LastErrorReactiveMongoException
  39. def n: Int

    Permalink

    Alias for updated to also support the short MongoDB syntax

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

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

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

    Permalink
    Definition Classes
    AnyRef
  43. val ok: Boolean

    Permalink

    True if the last operation was successful

  44. val originalDocument: Option[BSONDocument]

    Permalink

    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

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

    Permalink
    Definition Classes
    Throwable
  47. def printStackTrace(): Unit

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

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

    Permalink

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

  50. lazy val stringify: String

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

    Permalink
    Definition Classes
    AnyRef
  52. def toString(): String

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

    Permalink

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

  54. val updatedExisting: Boolean

    Permalink

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

  55. final def wait(): Unit

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

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

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

    Permalink
    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

    Permalink
    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