Quoting Harry Henry Gebel <[EMAIL PROTECTED]>:
> On Thu, May 25, 2000 at 03:04:01PM +0800, James Henstridge wrote:
> > On Thu, 25 May 2000, Harry Henry Gebel wrote:
> > > How do I stop mainloop from catching exceptions?
> > Set the PYGTK_FATAL_EXCEPTIONS environment variable before running
> > your
>
> If I set this environment variable in the program prior to importing
> gtk,
> gnome.ui, and libglade will it still work? My intention is to put
> mainloop
> in a try clause and put up a GnomeErrorDialog with a traceback, append
> the
> traceback to a log file, then call mainloop again to continue with the
> program (hoping that you can run mainloop again after an uncaught
> exception
> like you can after mainquit). I would like this to be a standard
> function
> of the program, which is why I would like to set it in the program
> (Although if it can't I can always wrap the program in a shell script
> too.)
Oops, I overread that you also want to show the error in a dialog. Here is
a very simple solution I used:
- Create a class which has the methods write(), flush() and close(). When
write() is called, then a small dialog with a GtkText is shown and the
data is appended to that text plus the data is written to a file. The
user should be able to close the dialog (just hide it) and to clear the
GtkText.
- Create an instance of this class and store it in sys.stderr
--
==============================================
Sowatec AG, CH-8330 Pf�ffikon (ZH)
Witzbergstr. 7, http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, [EMAIL PROTECTED]
==============================================
-------------------------------------------------
This mail sent through IMP: www.hepe.com
-
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]