Sha256: 8e99e4aaf43a29184c062f1eb33b7c9d1db5ad928d8ad9b234213e2d3296c562

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

module Tartarus::Rescue
  def self.included(base)
    base.class_eval do
      alias_method_chain :rescue_action, :tartarus
    end
  end
  
  def rescue_action_with_tartarus(exception)
    is_exception = response_code_for_rescue(exception) == :internal_server_error

    if is_exception and Tartarus.logging_enabled?
      Tartarus.log(self, exception)
    end

    rescue_action_without_tartarus(exception)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tartarus-1.0.1 lib/tartarus/rescue.rb