On 01/12/2016 12:34 PM, David Malcolm wrote:
I looked at this code, and there are two near-identical blocks which
reset all these variables. You are modifying only one of them, leaving
the one inside the if { catch } thing unchanged - is this intentional?
I'm not particularly strong at Tcl, but am I right in thinking that
given that we have this:
if { [ catch { eval saved-dg-test $args } errmsg ] } {
(A) set and unset various things
error $errmsg $saved_info
}
(B) set and unset the same various things as (A)
that (B) will always be reached, and that the duplicates in (A) are
redundant? (unless they affect "error")
Seems like it would, but, well it's TCL, so who in the hell knows.
I see that this pattern was introduced back in r67696 aka
91a385a522a94154f9e0cd940c5937177737af02:
Strangely, I can't find the patch in the archives nor any discussion for
the patch. It seems to have appeared from nowhere. My search-fu must
be weak tonight. It may not have helped understand why this code is the
way it is anyway.
This duplication screams that it ought to be its own procedure if we're
going to keep the apparently duplicated behaviour.
Jeff