[wxPython-users] Exceptions
Raffaello Barella
barbarossa.platz at gmail.com
Sun Mar 9 22:45:28 PDT 2008
You can try with the following code in the call to App.MainLoop() (and in my
applications it works):
2008/3/10, Mark Erbaugh <mark at microenh.com>:
>
> Is there a place / way to trap unhandled exceptions in a wxPython
> application. At first I thought that I could put the call to
> App.MainLoop() inside a try: except: block and catch the exception
> there, but it seems that unhandled exceptions raised in my code never
> make it there.
>
> My program uses psycopg to access a PostgreSQL database and if an
> unexpected database error occurs, I'd like my program to display a
> message with the error information from psycopg and exit. I'm already
> handling recoverable errors (integrity violations, etc).
>
> For example, one error that I want to abort from would be permission
> problems. If somehow the user doesn't have the appropriate permissions
> for an operation, I want to display the error so that someone can go
> into Postgres and adjust permissions.
>
> Thanks,
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200803=
10/36aeb2ab/attachment.htm
More information about the wxpython-users
mailing list