public void Rollback() { if (_connection == null) { return; } if (_mode == CommandRunnerMode.External) { return; } try { _retryPolicy.Execute(() => _connection.Rollback()); } catch (RollbackException e) { if (e.InnerException != null) { Logger.LogFailure(new NpgsqlCommand(), e.InnerException); } } catch (Exception e) { Logger.LogFailure(new NpgsqlCommand(), e); } finally { _connection.Dispose(); _connection = null; } }
public void Rollback() { if (_connection == null) { return; } try { _connection.Rollback(); } catch (RollbackException e) { if (e.InnerException != null) { Logger.LogFailure(new NpgsqlCommand(), e.InnerException); } } catch (Exception e) { Logger.LogFailure(new NpgsqlCommand(), e); } finally { _connection.Dispose(); _connection = null; } }