lib/adhearsion/reporter.rb in adhearsion-reporter-2.0.0 vs lib/adhearsion/reporter.rb in adhearsion-reporter-2.0.1

- old
+ new

@@ -9,10 +9,10 @@ end init :reporter do config = Adhearsion.config[:reporter] notifier = Toadhopper.new config.api_key, :notify_host => config.url - Events.register_callback(:exception) do |e| + Events.register_callback(:exception) do |e, logger| response = notifier.post!(e) if !response.errors.empty? || !(200..299).include?(response.status.to_i) logger.error "Error posting exception to #{config.url}! Response code #{response.status}" response.errors.each do |error| logger.error "#{error}"