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