Sha256: d8a99b293a2711183c8921662b99f5e85674a1ed9c431df627b313f665e0afed

Contents?: true

Size: 481 Bytes

Versions: 31

Compression:

Stored size: 481 Bytes

Contents

require_relative "base_error_handler"
module Pwwka
  module ErrorHandlers
    class IgnorePayloadFormatErrors < BaseErrorHandler
      def handle_error(receiver,queue_name,payload,delivery_info,exception)
        if exception.kind_of?(JSON::JSONError)
          log("Ignoring JSON error",queue_name,payload,delivery_info,exception)
          receiver.nack(delivery_info.delivery_tag)
          abort_chain
        else
          keep_going
        end
      end
    end

  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
pwwka-1.0.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-1.0.0.RC1 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.24.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.23.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.7 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.7.RC lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.23.0.RC2 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.6 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.23.RC1 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.5 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.4 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.3 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.2 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.21.3 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.2.RC4 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.2.RC3 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.2.RC2 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.0.RC2 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.22.0.RC lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.21.2 lib/pwwka/error_handlers/ignore_payload_format_errors.rb