]> git.openstreetmap.org Git - rails.git/commitdiff
Log unexpected exceptions raised by API calls.
authorTom Hughes <tom@compton.nu>
Sat, 15 Aug 2009 11:35:43 +0000 (11:35 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 15 Aug 2009 11:35:43 +0000 (11:35 +0000)
app/controllers/application_controller.rb

index 2093a959c85af202b2d4a4dfce420578f65489c9..3eefa4a9142d4d760b959799b33fb5fad0803b4a 100644 (file)
@@ -132,6 +132,8 @@ class ApplicationController < ActionController::Base
     rescue OSM::APIError => ex
       report_error ex.message, ex.status
     rescue Exception => ex
+      logger.info("API threw unexpected #{ex.class} exception: #{ex.message}")
+      ex.backtrace.each { |l| logger.info(l) }
       report_error "#{ex.class}: #{ex.message}", :internal_server_error
     end
   end