Whatever message this page gives is out now! Go check it out!
future.handleAsync(function)| Parameter | Description |
|---|---|
| function | Required. A function (value, error) that returns the next value. Test for isNull(error) to branch. |
<cfscript>
future = runAsync(function() { throw("error"); });sleep(200);
handled = future.handleAsync(function(value, error) { return isNull(error) ? value : "recovered";});
writeOutput(handled.get()); // recovered
</cfscript>