summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-23 21:51:52 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-23 21:51:52 +0000
commit19ce0218931fbf4d5c9e76d26655ff8c93d073a9 (patch)
treef21c5bbf37d4eab67909945fe7d57622708b00dd /lib/rbot
parent37ce944a1bd432f329662b8d2b28c55ef995d928 (diff)
Add debug backtrace info for HttpUtil failures
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/httputil.rb3
1 files changed, 3 insertions, 0 deletions
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