From 7cb6d8f88d3b2c4a9d72aa47d5fed6f734fdc312 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Mon, 15 Jan 2007 20:26:11 +0000 Subject: catch any exception in HTTP module and report is as a link problem git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@308 86f53f14-5ff3-0310-afe5-9b438ce3f40c --- schemes/http.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'schemes') diff --git a/schemes/http.py b/schemes/http.py index e581eb2..ee9b499 100644 --- a/schemes/http.py +++ b/schemes/http.py @@ -150,6 +150,13 @@ def fetch(link, acceptedtypes): debugio.debug("error reading HTTP response: "+str(e)) link.add_linkproblem("error reading HTTP response: "+str(e)) return None + except Exception, e: + # handle all other exceptions + debugio.debug('unknown exception caught: '+str(e)) + link.add_linkproblem('error reading HTTP response: '+str(e)) + import traceback + traceback.print_exc() + return None finally: # close the connection before returning if conn is not None: -- cgit v1.2.3