module Airbrake::Rails::ErrorLookup

Private Instance Methods

rescue_action_locally_with_airbrake(exception) click to toggle source
# File lib/airbrake/rails/error_lookup.rb, line 15
def rescue_action_locally_with_airbrake(exception)
  result = rescue_action_locally_without_airbrake(exception)

  if Airbrake.configuration.development_lookup
    path   = File.join(File.dirname(__FILE__), '..', '..', 'templates', 'rescue.erb')
    notice = Airbrake.build_lookup_hash_for(exception, airbrake_request_data)

    result << @template.render(
      :file          => path,
      :use_full_path => false,
      :locals        => { :host    => Airbrake.configuration.host,
                          :api_key => Airbrake.configuration.api_key,
                          :notice  => notice })
  end

  result
end