Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f58b5ecf67bba3a9238f6e870e659f3d6b75dea1
Ticket: 1246399fffffffffffffffffffffffffffffffff
error command faile to set errorCode
User & Date: alvinpleung on 2005-07-27 23:01:01
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    I am currrently using tcl 8.4.9 with Itcl 3.2.  My
    program throws an error with error code inside one of
    the itcl object method.  However, the errorcode in the
    global scope did not get updated.
    
    
    #Error code in tcl 
    saveErrorCode - NONE
    
    #tclCmdAH.c:563 for tcl8.4.9 with Itcl 3.2
    errorCode = TOOMANYWIRETYPE
    
    #Error code in tcl 
    saveErrorCode - NONE
    
    proc saveErrorCode {name index op} {
    puts "saveErrorCode - [set $name]"
    }
    
    trace variable errorCode rwu saveErrorCode
    
    # trace is generated
    if {[catch {$a run $xmlf} msg]} {
    ...
    }
    
    I changed tclCmdAH.c:563 from
    Tcl_SetVar2Ex(interp, "errorCode", NULL, objv[3],
    TCL_GLOBAL_ONLY);
    
    to
    
    Tcl_ObjSetVar2(interp, iPtr->execEnvPtr->errorCode,
    NULL, objv[3], TCL_GLOBAL_ONLY);
    
    
    The trace changed to
    #Error code in tcl
    saveErrorCode - NONE
    
    #tclCmdAH.c:563 for tcl8.4.9 with Itcl 3.2
    errorCode = TOOMANYWIRETYPE
    
    #Error code in tcl
    saveErrorCode - TOOMANYWIRETYPE
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "alvinpleung"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to: "error command faile to set errorCode"
  11. type changed to: "Bug"