Subject: Bug Tcl 8.3.0 write traces on ::errorInfo screw up the traceback mechanism - DN [1]


alexandre.ferrieux@cnet.francetelecom.fr - 16 Feb 2000 - comp.lang.tcl

 Tcl 8.3.0 Bug:  Generated by Scriptics' bug entry form at
     http://www.scriptics.com/support/bugForm.html
 Responses to this post are encouraged.
 ------

 Submitted by:  Alexandre Ferrieux
 OperatingSystem:  Solaris
 Synopsis:  write traces on ::errorInfo screw up the traceback mechanism

 ReproducibleScript:
 # that's an all-OS, all-Tcl bug. But the stupid bugform now requires patchlevel and OS values !!!

 trace variable ::errorInfo w tt
 proc tt args {#donothing}

 # from now on , when an error bursts the ::errorInfo contains only the outermost 'while executing'
 proc a {} b
 proc b {} c
 proc c {} d
 proc d {} e
 a
     invalid command name "e"
 puts $::errorInfo
     invalid command name "e"
         while executing
     "a"

 DesiredBehavior:
 A write trace doing nothing should be transparent !!!

 Comments:
     I discovered that while trying to implement a 'substituted trace'
     utility (as described earlier in an RFE).
     To do that in pure Tcl, I'd use [info level 0] from within a write trace
     on ::errorInfo. This way I'd get the actual parameters of all the calls
     on the stack trace instead of the stupid unsubstituted source exceprt
     (try debugging a recursive proc with that...).

     Except today I can't due to the bug just reported.

Last modified
2000-03-11

(195.108.246.55)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated