mailRe: r2540 - in /branches/warning: errors.py generic_fns/pdb.py relax


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

Header


Content

Posted by Edward d'Auvergne on August 31, 2006 - 16:14:
They're not RelaxErrors or standard python errors, I just made them
look like it.  As these errors occur very early before jumping into
the UI code they don't need to be RelaxErrors.  This is still program
initialisation and the errors simply inform the user that their
command line options are incorrect. Therefore catching is not an
issue.  Simplification by replacing the code in the file 'relax':

       # Raise a clean error.
       try:
           raise RelaxError, message
       except AllRelaxErrors, instance:
           sys.stderr.write(instance.__str__())

with:

       # The error message.
       sys.stderr.write('RelaxError: ' + message)

That single simplification solves the initialisation order problems
and makes these very different types of error look like RelaxErrors.

Edward



Related Messages


Powered by MHonArc, Updated Thu Aug 31 16:21:29 2006