From: Steve C. <ste...@ya...> - 2004-11-23 01:29:59
|
I've updated backend_gtk.py in cvs to use a default exception handler, and noticed a few things in the process: - sys.excepthook does not catch SystemExit, which is what we wanted anyway. - for some errors I needed to display a matplotlib message rather than the default exception message, or to raise an exception where error_msg () was used with no exception. I added an 'MPLError' exception, its probably best to move it into a central file if other people need to use it also. - changing from error_msg() to raise exception means the rest of the method will not execute, which I hadn't thought about. This is no good for 'get_filename_from_user()' where I want to loop until a file (or Cancel) is selected. So I think GTK still has a need to use of a popup message dialog occasionally. And for print_figure() it means the section of code to restore figure settings will not get executed after an error. Steve |