trap(_:)

trap a throwing closure, emitting diagnostics on error and returning boolean representing success

Observability.swift:251
@discardableResult func trap(_ closure: () throws -> Void) -> Bool