From: Tom Hughes Date: Sat, 15 Aug 2009 11:35:43 +0000 (+0000) Subject: Log unexpected exceptions raised by API calls. X-Git-Tag: live~6733 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cd8bb0dc577f2384a7b9732fb9ac9ec390fc8b19?hp=-c;ds=sidebyside Log unexpected exceptions raised by API calls. --- cd8bb0dc577f2384a7b9732fb9ac9ec390fc8b19 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2093a959c..3eefa4a91 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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