Sha256: b50e414d173d038ebb300a948408b313d6fa9b878f154937398e4e6b8d941ba7

Contents?: true

Size: 426 Bytes

Versions: 2

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

module ActiveRecordMysqlXverify
  module ErrorHandler
    def execute(*, **)
      super
    rescue StandardError
      _flag_extend_verify!
      raise
    end

    def raw_execute(*, **)
      super
    rescue StandardError
      _flag_extend_verify!
      raise
    end

    def _flag_extend_verify!
      Thread.current[ActiveRecordMysqlXverify::EXTEND_VERIFY_FLAG] = true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_record_mysql_xverify-0.4.0 lib/active_record_mysql_xverify/error_handler.rb
active_record_mysql_xverify-0.3.0 lib/active_record_mysql_xverify/error_handler.rb