Pike v8.1 release 6

Method Concurrent.Future()->thencatch()


Method thencatch

this_program thencatch(function(mixed, mixed ... :mixed) onrejected, mixed ... extra)

Parameter onrejected

Function to be called. The first argument will be the failure result of this Future. The return value will the failure result of the new Future.

Parameter extra

Any extra context needed for onrejected. They will be provided as arguments two and onwards when the callback is called.

Returns

The new Future.

See also

then(), on_failure(), Promise.failure() https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise