[python-win32] StartDoc failed

Mark Hammond mhammond at skippinet.com.au
Mon Feb 28 02:40:37 CET 2005


> if my default windows printer is a network printer and not available,
> then dc.StartDoc() causes a traceback which I cannot catch using
> try...except.

You can catch it via try/except.  In your specific example, you would want
to catch win32ui.error.  The reason catching Exception doesn't work is
because win32ui.error does not sub-class Exception.

Mark.



More information about the Python-win32 mailing list