How do you find what exceptions a class can throw?
Chris Green
cl at isbd.net
Sun Dec 20 11:02:53 EST 2020
Stefan Ram <ram at zedat.fu-berlin.de> wrote:
> Chris Green <cl at isbd.net> writes:
> >I am using poplib.POP3_SSL() and I want to know what exceptions can be
> >thrown when I instantiate it. Presumably it inherits them because
> >there's nothing much in the documentation page for poplib.POP3_SSL().
>
> Both Java and C++ have tried to introduce a static
> declaration of exceptions IIRC, but IIRC this was less
> popular as it led to problems.
>
> Ultimately, it is not possible to tell what exceptions
> a call might throw. In such a case, it may help to explain
> to the newsgroup why this information is needed.
>
So that, as is always advised, I can catch the specific exception
being thrown!
--
Chris Green
ยท
More information about the Python-list
mailing list