1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Include backtrace in failsafe log. Rescue possible exceptions in failsafe response.

This commit is contained in:
Jeremy Kemper 2010-05-29 19:26:02 -07:00
parent 55a5c7068c
commit bd9805871b
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ module ActionDispatch
rescue_action_in_public(exception) rescue_action_in_public(exception)
end end
rescue Exception => failsafe_error rescue Exception => failsafe_error
$stderr.puts "Error during failsafe response: #{failsafe_error}" $stderr.puts "Error during failsafe response: #{failsafe_error}\n #{failsafe_error.backtrace * "\n "}"
FAILSAFE_RESPONSE FAILSAFE_RESPONSE
end end

View file

@ -13,7 +13,7 @@
request_dump = clean_params.empty? ? 'None' : clean_params.inspect.gsub(',', ",\n") request_dump = clean_params.empty? ? 'None' : clean_params.inspect.gsub(',', ",\n")
def debug_hash(hash) def debug_hash(hash)
hash.sort_by { |k, v| k.to_s }.map { |k, v| "#{k}: #{v.inspect}" }.join("\n") hash.sort_by { |k, v| k.to_s }.map { |k, v| "#{k}: #{v.inspect rescue $!.message}" }.join("\n")
end end
%> %>