From cd8bb0dc577f2384a7b9732fb9ac9ec390fc8b19 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 15 Aug 2009 11:35:43 +0000 Subject: [PATCH 1/1] Log unexpected exceptions raised by API calls. --- app/controllers/application_controller.rb | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.43.2