Created
February 11, 2009 18:24
-
-
Save joshsusser/62151 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
around_filter :you_are_here | |
def you_are_here | |
puts "***** NEW ACTION: #{controller_name} - #{action_name} *****" | |
begin | |
yield | |
ensure | |
puts "<pre>" | |
if $! then | |
puts "***** CAUGHT EXCEPTION: #{$!.message}" | |
puts $!.backtrace | |
raise | |
else | |
puts "***** CALL STACK *****" | |
puts caller | |
end | |
puts "</pre>" | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment