Permalink
Browse files

handle elapsed times that are nil in #log_response (happens when API …

…method

throws an exception). this fixes exception marshaling so that remote callers get
a proper stack trace.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@798 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
leonbreedt committed Feb 25, 2005
1 parent b53f94d commit 7a5ff308eb5f45dcd8f7a25f6915e78f3b9528a0
@@ -95,7 +95,7 @@ def log_request(request)
def log_response(response, elapsed)
unless logger.nil? || response.nil?
- logger.debug("\nWeb Service Response (%f):" % elapsed)
+ logger.debug("\nWeb Service Response" + (elapsed ? " (%f):" % elapsed : ":"))
indented = response.raw_body.split(/\n/).map{|x| " #{x}"}.join("\n")
logger.debug(indented)
end

0 comments on commit 7a5ff30

Please sign in to comment.