init(catching:)
Creates a new result by evaluating an async throwing closure, capturing the returned value as a success, or any thrown error as a failure.
init(catching body: () async throws(Failure) -> Success) async
Parameters
- body
A throwing closure to evaluate.