presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/util/DatabaseUtil.java/DatabaseUtil/runTransaction
class DatabaseUtil:    public static <T> T runTransaction(IDBI dbi, TransactionCallback<T> callback)
    {
        try {
            return dbi.inTransaction(callback);
        }
        catch (DBIException e) {
            if (e.getCause() != null) {
                throwIfInstanceOf(e.getCause(), PrestoException.class);
            }
            throw metadataError(e);
        }
    }