Whatever message this page gives is out now! Go check it out!
future.exceptionally(function)| Parameter | Description |
|---|---|
| function | Required. A function that accepts the exception from the failed stage and returns a recovery value. |
<cfscript>
future = runAsync(function() { throw("error"); });
sleep(200);
recovered = future.exceptionally(function(error) {
return "fallback";
});
writeOutput(recovered.get()); // fallback
</cfscript>