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 - 15:30:
On 8/31/06, Chris MacRaild wrote:
On Wed, 2006-08-30 at 15:50 +1000, Edward d'Auvergne wrote:
> Thanks, these changes look very promising.  A few things need to be
> discussed and tested before merging this code back into the main 1.2
> line.  I have a few points below interspersed between your code.
> Firstly I have committed a change which affects the order of
> initialisation so that the RelaxErrors and RelaxWarnings are
> initialised after the pedantic flag but before the command line
> parsing (see 
https://mail.gna.org/public/relax-commits/2006-08/msg00014.html,
> Message-id: <E1GIIBN-00026c-Ga@xxxxxxxxxxxxxxxxxx>).  This removes the
> missing AllRelaxErrors error.
>

Testing this again in preparation for the merge shows that this change
has broken the pedantic functionality. The pedantic flag must be
correctly set before RelaxWarnings is initialised. Probably the best fix
will be to initialise RelaxErrors first, before parsing comand line
arguments, then finally initialise the warnings.

Maybe the RelaxParser.error() function (in the file 'relax') needs to be reconsidered to remove the dependence on the RelaxErrors. Then the order won't matter. I think the only reason for the entire RelaxParser code is to print 'RelaxError: ' in front of all the parser errors. This could be done without the try statement, just add the text to the front of the message, write it to stderr, then sys.exit().

Edward



Related Messages


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