• 1Installation
  • 2Preliminary Knowledge
  • 3Async Executor
  • 4Then/Catch/Finally
  • 5Error Recovery
  • 6Chaining

Async.apex

  • Docs
  • Tutorials
Getting started with Async.apex

Then/Catch/Finally

We have corresponding terms for then/catch/finally in Async.apex: then/error/done. Their usages are the same.

promise.then(R.debug)
    .error(new ReportFunc())
    .done(new CleanupFunc())
    .fork();

Important is that differently from promises, Async instances are lazy, which means that we need to fork them to trigger the execution.

Done