The recent work with the CompareLeoOutlines class has suggested a totally 
unexpected pattern, namely suppressing internal errors when file errors 
have been seen. This posts shows that this pattern is valid.

As of 958f6e464 the "oops" error reporting function in 
fc.resolveArchivedPosition is:

def oops(message):
    '''Give an error only if no file errors have been seen.'''
    if not g.unitTesting and self.c.atFileCommands.errors == 0:
        g.error('bad archived position: %s' % (message))
    return None

In other words, we suppress the error if at.errors > 0.  This works well in 
the CompareLeoOutlines class.  The question remains, is this a reasonable 
thing to do in general?

I believe it is.  Indeed, the *only* call tree for 
fc.resolveArchivedPosition is:

fc.readExternalFiles
  fc.restoreDescendentAttributes
    fc.resolveArchivedPosition

This will never change.  Furthermore, only fc.readExternalFiles (and its 
helpers) sets at.errors.

In short, suppressing wonky errors when at.errors > 0 is justified.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to