[IronPython] .NET Exception to Python Exception conversion

Laurent Debacker debackerl at gmail.com
Tue Jun 19 20:45:27 CEST 2007


Hello,

I'm catching exceptions raised in my winforms thread using

            def exceptionHandler(sender, event):
                print event.Exception

            Application.ThreadException +=
ThreadExceptionEventHandler(exceptionHandler)
            Application.SetUnhandledExceptionMode(
UnhandledExceptionMode.CatchException)

However the exception I get, contains the long, unintuitive stack trace. How
can I convert it to a nice Python exception ?

Regards,
Laurent Debacker.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070619/b5ff56fe/attachment.html>


More information about the Ironpython-users mailing list