abstract fun <U : Any!> handle(fn: Function<in Throwable!, out U>!): AsyncResult<U>!
(source)
Returns a new result that, when this result completes either normally or exceptionally, completes with the value obtained from executing the supplied function with this result's exception (if any) as an argument.
The exception supplied to the function will be null
if this completion completes successfully.
fn
- Function<in Throwable!, out U>!: The function to execute.
- The type of the value returned from the function.
Return
AsyncResult<U>!: A new result.