How do I know all thrown exceptions of a function?

Syver Enstad syver at NOSPAMcyberwatcher.com
Sat Jan 20 19:02:36 EST 2001


Couldn't you use the source?

<gradha at iname.com> wrote in message news:g3lb49.73s.ln at 127.0.0.1...
> Hi.
>
> Several times browsing the module library, I've found some functions which
> state explicitly what exceptions they throw, because they are not the
> built-in types. However, how can I know the built-in exceptions a function
> my throw?
>
> This happened while implementing a file open call: I remembered it throwed
> and IOError exception when the file I was trying to open wasn't there, but
> I guess that's not a great way to discover what exceptions are thrown...
>
> --
>
>  Grzegorz Adam Hankiewicz   gradha at iname.com - http://gradha.infierno.org
>  Other web pages:  http://glub.ehu.es/  -  http://welcome.to/gogosoftware/





More information about the Python-list mailing list