trap(_:)

trap a throwing closure, emitting diagnostics on error and returning the value returned by the closure

Observability.swift:237
func trap<T>(_ closure: () throws -> T) -> T?