Author: bugman Date: Wed Aug 10 22:26:19 2011 New Revision: 14327 URL: http://svn.gna.org/viewcvs/relax?rev=14327&view=rev Log: RelaxErrors are handled as in the auto-analyses and prompt/scripting mode in the GUI user functions. The traceback is now suppressed and a dialog with the error is show. Modified: branches/gui_testing/gui/interpreter.py Modified: branches/gui_testing/gui/interpreter.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/interpreter.py?rev=14327&r1=14326&r2=14327&view=diff ============================================================================== --- branches/gui_testing/gui/interpreter.py (original) +++ branches/gui_testing/gui/interpreter.py Wed Aug 10 22:26:19 2011 @@ -33,7 +33,11 @@ # relax module imports. from prompt import interpreter +from relax_errors import AllRelaxErrors from status import Status; status = Status() + +# relax GUI module imports. +from gui.errors import gui_raise class Interpreter(Thread): @@ -118,7 +122,12 @@ finally: status.exec_lock.release() - # Handle all errors. + # Catch all RelaxErrors. + except AllRelaxErrors, instance: + # Display a dialog with the error. + gui_raise(instance, raise_flag=False) + + # Handle all other errors. except: # Print the exception. sys.stderr.write("Exception raised in thread.\n\n")