How to except the unexpected?
Rene Pijlman
reply.in.the.newsgroup at my.address.is.invalid
Sat Mar 4 06:32:40 EST 2006
James Stroud:
>Which suggests that "try: except HTTPException:" will be specific enough
>as a catchall for this module.
>
>The following, then, should catch everything you mentioned except the
>socket timeout:
Your conclusion may be (almost) right in this case. I just don't like this
approach. Basically this is reverse engineering the interface from the
source at the time of writing the app. Even if you get it right, it may
fail next week when someone added an exception to a module.
>But it seems to me that working with the internet as you are doing is
>fraught with peril anyway.
Why? It shouldn't be.
--
René Pijlman
More information about the Python-list
mailing list