Recover

@nowarn("msg=deprecated")
abstract class Recover[+T] extends RecoverBridge[T]

Callback for the Future.recover operation that conditionally turns failures into successes.

SAM (Single Abstract Method) class

Java API

Source:
Future.scala
class RecoverBridge[T]
trait Throwable => T
class Object
trait Matchable
class Any

Value members

Abstract methods

@throws(scala.Predef.classOf[scala.Throwable])
def recover(failure: Throwable): T

This method will be invoked once when/if the Future this recover callback is registered on becomes completed with a failure.

This method will be invoked once when/if the Future this recover callback is registered on becomes completed with a failure.

Returns:

a successful value for the passed in failure Throws the passed in failure to propagate it. Java API

Source:
Future.scala

Concrete methods

final override protected def internal(result: Throwable): T
Definition Classes
Source:
Future.scala

Inherited methods

override def andThen[C](k: T => C): PartialFunction[Throwable, C]
Definition Classes
Inherited from:
PartialFunction
final override def apply(t: Throwable): T
Definition Classes
Inherited from:
RecoverBridge
Source:
Future.scala
def applyOrElse[A1 <: Throwable, B1 >: T](x: A1, default: A1 => B1): B1
Inherited from:
PartialFunction
def compose[A](g: A => Throwable): A => T
Inherited from:
Function1
final override def isDefinedAt(t: Throwable): Boolean
Definition Classes
Inherited from:
RecoverBridge
Source:
Future.scala
def lift: Throwable => Option[T]
Inherited from:
PartialFunction
def orElse[A1 <: Throwable, B1 >: T](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
Inherited from:
PartialFunction
def runWith[U](action: T => U): Throwable => Boolean
Inherited from:
PartialFunction
override def toString(): String
Definition Classes
Function1 -> Any
Inherited from:
Function1
Inherited from:
PartialFunction