Catching all exceptions *and* their args
Ignacio Vazquez-Abrams
ignacio at openservices.net
Tue Aug 21 23:31:24 EDT 2001
On Wed, 22 Aug 2001, Steve R. Hastings wrote:
> Hello. I'm a Python newbie who has searched a bunch of documentation
> before posting this. If it's documented somewhere I missed, please point
> me at the documentation.
Strangely enough, the information for catching getopt errors is in exactly the
same location as the documentation for the getopt module itself
(http://www.python.org/doc/1.5.2p2/lib/module-getopt.html). It turns out that
if you let the exception through, you'll notice that the exception raised is
getopt.error. Therefore your program has to catch getopt.error.
--
Ignacio Vazquez-Abrams <ignacio at openservices.net>
More information about the Python-list
mailing list