EasyFutures icon indicating copy to clipboard operation
EasyFutures copied to clipboard

How to continue promise-future chain on error?

Open gerchicov-bp opened this issue 4 years ago • 0 comments

Example:

let promise = Promise<Void>()
Dispatch.global.async {
  ... //fulfill promise with success or error
}
promise.future.onError { error in
  ...//some async actions
}

How to append "some async actions" to the action chain correctly if they are executed in error case only?

gerchicov-bp avatar Mar 13 '20 10:03 gerchicov-bp