From e6a1c2faf966e7de5b46096cc262838034064428 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Wed, 13 Oct 2010 22:42:43 +0200 Subject: [PATCH] Added some documentation about exception handling. --- linkcheck/director/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linkcheck/director/__init__.py b/linkcheck/director/__init__.py index eb0f53d4..1b418665 100644 --- a/linkcheck/director/__init__.py +++ b/linkcheck/director/__init__.py @@ -47,8 +47,13 @@ def check_urls (aggregate): " is allowed to start new threads.")) abort(aggregate) except Exception: + # Catching "Exception" is intentionally done. This saves the program + # from badly-programmed libraries that raise all kinds of strange + # exceptions. console.internal_error() abort(aggregate) + # Not catched exceptions at this point are SystemExit and GeneratorExit, + # and both should be handled by the calling layer. def check_url (aggregate):