Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3e91f08799665c958f9f909fe51a1f989cace382
Ticket: 2438181fffffffffffffffffffffffffffffffff
Incorrect error reporting in traces
User & Date: nobody on 2008-12-17 06:53:16
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    This script:
    #-----------
    set pbody "set comms \[list [info commands]\]"
    append pbody {
        set pname [lindex $pstr 1]
        if {[lsearch -exact $comms $pname]!=-1} {
            puts "$pname already exists"
            return
            }
        puts "Setting trace on: $pname"
        trace add execution $pname enter my_report2
        puts "Trace set"
        }
    
    #This is an error I made:
    proc my_report {pstr op} $pbody 
    
    #This was intended, btw...:
    #proc my_report {pstr args} $pbody
    
    proc my_report2 {commstr args} {
    set pname [lindex $commstr 0]
    puts "<DEBUG> $pname"
    }
    
    trace add execution proc leave my_report
    
    #Testing:
    
    rename gets _gets
    proc gets {a b} {
        puts "A new gets"
    }
    
    proc exp {a b} {
    puts $a
    puts $b
    }
    
    exp 1 2
    gets 5 6
    #-----------
    
    Correctly reports in tclkit8.4.19:
    -----
    wrong # args: should be "my_report pstr op"
        while executing
    "proc gets {a b} {
        puts "A new gets"
    }"
        (file "bug.tcl" line 29)
    -----
    
    But both tcl 8.5.2 and 8.6a3 report:
    -----
    
        while executing
    "proc gets {a b} {
        puts "A new gets"
    }"
        (file "bug.tcl" line 29)
    -----
    As you see, error description is missing.
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.5.5"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nobody"
  10. subsystem changed to: "46. Traces"
  11. title changed to: "Incorrect error reporting in traces"
  12. type changed to: "Bug"