TypeDoesNotMatchException

reactivemongo.api.bson.exceptions.TypeDoesNotMatchException$
See theTypeDoesNotMatchException companion class

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

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

Defines a type exception.

Defines a type exception.

Attributes

actual

the name of the actual type

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

the name of the expected type

Defines a type exception.

Defines a type exception.

Attributes

actual

the actual value

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 _ =>
}

Attributes