Future.onError

Future!T onError(void delegate(string) @safe callback) ref @trusted return

Register a callback to be invoked when the future is rejected.

If the future is already rejected, the callback is invoked immediately.

Parameters

callbackThe delegate to invoke with the error message.

Returns

This future for method chaining.