Returns the value if it is present, otherwise invokes the specified function onFailure and returns its result.
Return
the value if present, otherwise the result of invoking onFailure
Parameters
a function that takes a WrappedException and returns a value of type T