Want to catch pywintypes.api_error

Franz GEIGER fgeiger at datec.at
Tue Mar 13 12:35:33 EST 2001


Thank you, Mark!

How could I have figured out this by myself? I did a text search for
api_error over my ActivePython distribution, w/o success. Is it burrie din
those pyd-files?

Regards
Franz


"Mark Hammond" <MarkH at ActiveState.com> wrote in message
news:3AAE208D.4010103 at ActiveState.com...
> Franz GEIGER wrote:
>
> > When I start win32api.FindFiles(filespec) with a non-existing filespec
it
> > throws an exception of class pywintypes.api_error. But a "except
> > pywintypes.api_error, e:" does not work. Using "except Exception, e:"
does
> > the job, because Exception is the base class. But how can I catch
api_error?
> > What do I miss?
> >
>
> win32api.error
>
> Mark.
>





More information about the Python-list mailing list