class Airbrake::CollectingSender

Attributes

last_notice_path[W]

Used when test mode is enabled, to store the last XML notice locally

Public Instance Methods

last_notice() click to toggle source
# File lib/airbrake/sender.rb, line 193
def last_notice
  File.read last_notice_path
end
last_notice_path() click to toggle source
# File lib/airbrake/sender.rb, line 197
def last_notice_path
  File.expand_path(File.join("..", "..", "..", "resources", "notice.xml"), __FILE__)
end
send_to_airbrake(notice) click to toggle source
Calls superclass method Airbrake::Sender#send_to_airbrake
# File lib/airbrake/sender.rb, line 201
def send_to_airbrake(notice)
  data = prepare_notice(notice)

  notices_file = File.open(last_notice_path, "w") do |file|
    file.puts data
  end

  super(notice)
ensure
  notices_file.close if notices_file
end