mailr21438 - /trunk/lib/warnings.py


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

Header


Content

Posted by edward on November 14, 2013 - 11:23:
Author: bugman
Date: Thu Nov 14 11:23:52 2013
New Revision: 21438

URL: http://svn.gna.org/viewcvs/relax?rev=21438&view=rev
Log:
Create two new warnings RelaxNucleusWarning and RelaxSpinTypeWarning to match 
the equivalent errors.


Modified:
    trunk/lib/warnings.py

Modified: trunk/lib/warnings.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/warnings.py?rev=21438&r1=21437&r2=21438&view=diff
==============================================================================
--- trunk/lib/warnings.py (original)
+++ trunk/lib/warnings.py Thu Nov 14 11:23:52 2013
@@ -130,6 +130,25 @@
         self.text = "The PDB file %s cannot be found, no structures will be 
loaded." % file
 
 
+# Nuclear warnings.
+###################
+
+# Nucleus not set.
+class RelaxNucleusWarning(BaseWarning):
+    def __init__(self, spin_id=None):
+        if spin_id != None:
+            self.text = "The type of nucleus for the spin '%s' has not yet 
been set." % spin_id
+        else:
+            self.text = "The type of nucleus has not yet been set."
+
+# Spin type not set.
+class RelaxSpinTypeWarning(BaseWarning):
+    def __init__(self, spin_id=None):
+        if spin_id != None:
+            self.text = "The nuclear isotope type for the spin '%s' has not 
yet been set.  Please use the spin.isotope user function to set the type." % 
spin_id
+        else:
+            self.text = "The nuclear isotope type has not yet been set.  
Please use the spin.isotope user function to set the type."
+
 # File warnings.
 ################
 




Related Messages


Powered by MHonArc, Updated Thu Nov 14 11:40:02 2013