Tcl Library Source Code

View Ticket
Login
Ticket UUID: 1280862
Title: profiler - errorInfo modifiable in enter- & leaveHandler
Type: Bug Version: None
Submitter: tircnf Created on: 2005-09-02 17:56:15
Subsystem: profiler Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Open Last Modified: 2007-08-22 06:19:11
Resolution: None Closed By:
    Closed on:
Description:
enterHandler and leaveHandler use catch statements to
test for the existance of certain namespace varibales.

if these catch statements fire, they modify errorInfo.

catching an error, and trying to log errorInfo can log
the wrong information if you are visiting a function
for the first time.

can't read
"::profiler::descendants(process_message,::errlog)": no
such element in array
    (reading value of variable to increment)
    invoked from within
"incr ::profiler::descendants($caller,$name)"


I added
   global errorInfo

    set origError $errorInfo

to the beginning and

 set errorInfo $origError

to the end of both enterHandler and leaveHandler.