projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9617ca2
)
Log unexpected exceptions raised by API calls.
author
Tom Hughes
<tom@compton.nu>
Sat, 15 Aug 2009 11:35:43 +0000
(11:35 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sat, 15 Aug 2009 11:35:43 +0000
(11:35 +0000)
app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/app/controllers/application_controller.rb
b/app/controllers/application_controller.rb
index 2093a959c85af202b2d4a4dfce420578f65489c9..3eefa4a9142d4d760b959799b33fb5fad0803b4a 100644
(file)
--- 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