Packages

object Message

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Message
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def unapply(scrutinee: Any): Option[String]

    Pattern matching extractor for the error message.

    Pattern matching extractor for the error message.

    import reactivemongo.api.commands.{ CommandError, WriteResult }
    
    def testError(err: CommandError): String = err match {
      case CommandError.Message(msg) => s"hasMessage: \$msg"
      case _ => "no-message"
    }
    
    def testWriteRes(res: WriteResult): String = res match {
      case CommandError.Message(msg) => s"onlyIfFailure: \$msg"
      case _ => "no-message"
    }