Sha256: 10b5dd135e8d0e618c10790be65e0caac75f91da355b036fb1b64135b6205f42
Contents?: true
Size: 1.08 KB
Versions: 19
Compression:
Stored size: 1.08 KB
Contents
module Airbrake module Rails module ErrorLookup # Sets up an alias chain to catch exceptions when Rails does def self.included(base) #:nodoc: base.send(:alias_method, :rescue_action_locally_without_airbrake, :rescue_action_locally) base.send(:alias_method, :rescue_action_locally, :rescue_action_locally_with_airbrake) end private 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 end end end
Version data entries
19 entries across 19 versions & 1 rubygems