How do I know all thrown exceptions of a function?

gradha at iname.com gradha at iname.com
Sat Jan 20 04:17:36 EST 2001


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