Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 48330313ae30f8ec108b1b45f20b5f9e8aa9987a
Ticket: 760947ffffffffffffffffffffffffffffffffff
trace on command leave changes errorInfo/errorCode
User & Date: yahalom on 2003-06-26 04:02:58
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl Version 8.4.3
    OS Platform and Version: windows 2000,linux redhat 7.3
    
    when putting a trace on command execution leave the 
    errorInfo and errorCode are not being set properly when 
    an error happens in the command being called
    
    proc traceLog {cmd info {result ""} {op ""}} {
    puts "----- trace -----"
    puts "command: $cmd"
    puts "info: $info"
    puts "result: $result"
    puts "op: $op"
    puts "----- leave trace -----"
    }
    proc test {} {
    error "testMsg" "testInfo" "testCode"
    }
    for {set i 0} {$i<2} {incr i} {
    catch {test} msg
    puts "message: $msg"
    puts "errorInfo: $errorInfo"
    puts "errorCode: $errorCode"
    unset msg
    unset errorCode
    unset errorInfo
    trace add execution test leave {traceLog}
    }
    
    result:
    
    message: testMsg
    errorInfo: testInfo
        (procedure "test"
        invoked from with
    "test"
    errorCode: testCode
    ----- trace -----
    command: test
    info: 1
    result: testMsg
    op: leave
    ----- leave trace ---
    message: testMsg
    errorInfo: testMsg
        while executing
    "test"
    errorCode: NONE
    
  4. foundin changed to: "obsolete: 8.4.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "yahalom"
  9. subsystem changed to: "18. Commands M-Z"
  10. title changed to: "trace on command leave changes errorInfo/errorCode"
  11. type changed to: "Bug"