wrapAnomaly

inline fun <R> wrapAnomaly(ctx: Map<String, *> = emptyMap<String, Any?>(), block: () -> R): R

Run block, catching any Throwable and rethrowing as the appropriate Anomaly with ctx merged into its data. Mirrors xtdb.error/wrap-anomaly.