mailr13916 - /branches/gui_testing/gui/errors.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 27, 2011 - 09:07:
Author: bugman
Date: Wed Jul 27 09:07:54 2011
New Revision: 13916

URL: http://svn.gna.org/viewcvs/relax?rev=13916&view=rev
Log:
Modified the gui_raise RelaxError function to have the raise_flag arg.

This allows the raising of the error to be skipped.


Modified:
    branches/gui_testing/gui/errors.py

Modified: branches/gui_testing/gui/errors.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/errors.py?rev=13916&r1=13915&r2=13916&view=diff
==============================================================================
--- branches/gui_testing/gui/errors.py (original)
+++ branches/gui_testing/gui/errors.py Wed Jul 27 09:07:54 2011
@@ -27,11 +27,13 @@
 import wx
 
 
-def gui_raise(relax_error):
+def gui_raise(relax_error, raise_flag=True):
     """Handle errors in the GUI to be reported to the user.
 
     @param relax_error:     The error object.
     @type relax_error:      RelaxError instance
+    @keyword raise_flag:    A flag which if True will cause the error to be 
raised, terminating execution.
+    @type raise_flag:       bool
     @raises:                The RelaxError.
     """
 
@@ -39,4 +41,5 @@
     wx.MessageBox(relax_error.text, caption=relax_error.__class__.__name__, 
style=wx.OK|wx.ICON_ERROR)
 
     # Throw the error to terminate execution.
-    raise relax_error
+    if raise_flag:
+        raise relax_error




Related Messages


Powered by MHonArc, Updated Wed Jul 27 09:20:03 2011