Capturing Python run-time exceptions ...

Richard Sharpe realrichardsharpe at
Sun Mar 25 22:16:40 MDT 2012

2012/3/25 Richard Sharpe <realrichardsharpe at>:
> Hi Folks,
> I need to get the following errors:
>       RuntimeError: (-1073741790, 'Access denied')
> It looks like I can do something like:
>    try:
>        some statements
>    except RuntimeError:
>        other statements
> It seems like there is a set there with two entries. How do I get
> access to those values.

OK, I found it in my Python book.

    except RuntimeError, val:

then val is the info that was printed by the default handler.

Richard Sharpe

More information about the samba-technical mailing list