Look at this code snippet:
userService.insert(user) match {
case Success(f) => Logger.debug("User created successfully")
case Failure(e) => {
// how do I determine the type of `e`?
}
}
How do I determine the type of the exception contained by Failure
? I need to take different actions depending on the exception type.
Exceptions
only. – Afterimage