]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Add debug backtrace info for HttpUtil failures
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 23 Jul 2006 21:51:52 +0000 (21:51 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 23 Jul 2006 21:51:52 +0000 (21:51 +0000)
lib/rbot/httputil.rb

index 336e063b0e13c5d8f5509b0c4f35228ea8bfbcb2..7edc286dbe32d7aca663dc80b18b47ddb1fa409c 100644 (file)
@@ -174,6 +174,7 @@ class HttpUtil
       }
     rescue StandardError, Timeout::Error => e
       error "HttpUtil.get exception: #{e.inspect}, while trying to get #{uri}"
+      debug e.backtrace.join("\n")
     end
     return nil
   end
@@ -205,6 +206,7 @@ class HttpUtil
       }
     rescue StandardError, Timeout::Error => e
       error "HttpUtil.head exception: #{e.inspect}, while trying to get #{uri}"
+      debug e.backtrace.join("\n")
     end
     return nil
   end
@@ -251,6 +253,7 @@ class HttpUtil
       end
     rescue => e
       warning "Error #{e.inspect} getting the page #{uri}, using cache"
+      debug e.backtrace.join("\n")
       return @cache[k][:body]
     end
     # If we still haven't returned, we are dealing with a non-redirected document