我想将隐式参数传递给我使用的部分recover
函数Future
。
def delete(id: Long) = ... { implicit something =>
serviceLayer.doSomething(id).recover(errorHandler)
}
def errorHandler: PartialFunction[Throwable, Result] = {
// I want to access the implicit parameter here
case e@SomeException(message) => ... and here
case _ => ... and here
}