TypeDoesNotMatchException

Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(expected: String, actual: String): TypeDoesNotMatchException

Defines a type exception.

Defines a type exception.

Value parameters:
actual

the name of the actual type

reactivemongo.api.bson.exceptions.
 TypeDoesNotMatchException("LocalDate", "String")
expected

the name of the expected type

def unapply(exception: Exception): Option[(String, String)]

Extracts expected and actual types from the type exception.

Extracts expected and actual types from the type exception.

import reactivemongo.api.bson.exceptions.TypeDoesNotMatchException

def foo(cause: Exception) = cause match {
 case TypeDoesNotMatchException(expected, actual) =>
   println(expected + " -> " + actual)

 case _ =>
}