Class: Pwwka::ErrorHandlers::IgnorePayloadFormatErrors
- Inherits:
-
BaseErrorHandler
- Object
- BaseErrorHandler
- Pwwka::ErrorHandlers::IgnorePayloadFormatErrors
- Defined in:
- lib/pwwka/error_handlers/ignore_payload_format_errors.rb
Constant Summary
Constants included from Logging
Instance Method Summary collapse
Methods included from Logging
Instance Method Details
#handle_error(receiver, queue_name, payload, delivery_info, exception) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/pwwka/error_handlers/ignore_payload_format_errors.rb', line 5 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 |