Author: bugman Date: Thu Sep 15 13:37:27 2011 New Revision: 14647 URL: http://svn.gna.org/viewcvs/relax?rev=14647&view=rev Log: Created the RelaxSpectraError and RelaxNoSpectraError error classes for spectral data. Modified: 1.3/relax_errors.py Modified: 1.3/relax_errors.py URL: http://svn.gna.org/viewcvs/relax/1.3/relax_errors.py?rev=14647&r1=14646&r2=14647&view=diff ============================================================================== --- 1.3/relax_errors.py (original) +++ 1.3/relax_errors.py Thu Sep 15 13:37:27 2011 @@ -586,6 +586,20 @@ +# Spectral data errors. +####################### + +# No spectral data. +class RelaxNoSpectraError(BaseError): + def __init__(self, spectrum_id): + self.text = "Spectral data corresponding to the ID string '%s' does not exist." % spectrum_id + +# Spectral data already exists. +class RelaxSpectraError(BaseError): + def __init__(self, spectrum_id): + self.text = "Spectral data corresponding to the ID string '%s' already exists." % spectrum_id + + # Relaxation data errors. #########################