[][src]Function pgx::pg_try

pub fn pg_try<Try, R>(try_func: Try) -> PgTryResult<R> where
    Try: FnOnce() -> R + UnwindSafe + RefUnwindSafe

Similar to guard, but allows the caller to unwrap the result in various ways, possibly performing cleanup work before the caught error is rethrown