From 19ce0218931fbf4d5c9e76d26655ff8c93d073a9 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 23 Jul 2006 21:51:52 +0000 Subject: [PATCH] Add debug backtrace info for HttpUtil failures --- lib/rbot/httputil.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rbot/httputil.rb b/lib/rbot/httputil.rb index 336e063b..7edc286d 100644 --- a/lib/rbot/httputil.rb +++ b/lib/rbot/httputil.rb @@ -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 -- 2.39.5