Message
reactivemongo.api.commands.CommandException$.Message$
object Message
Pattern matching extractor for the error message.
import reactivemongo.core.errors.DatabaseException
import reactivemongo.api.commands.{ CommandException, WriteResult }
def testError(err: DatabaseException): String = err match {
case CommandException.Message(msg) => s"hasMessage: \$msg"
case _ => "no-message"
}
def testWriteRes(res: WriteResult): String = res match {
case CommandException.Message(msg) => s"onlyIfFailure: \$msg"
case _ => "no-message"
}
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Message.type