Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 64f72963833da8295c14532244b733b6695bc024
Ticket: 2140628fffffffffffffffffffffffffffffffff
[unknown] should leave no tracks
User & Date: mad_derf on 2008-10-01 16:03:31
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    With the latest Tcl (8.5.4), the errorInfo variable does not seem to be set at tclsh initialisation.
    
    The issue being that, if one does :
    
    set errorInfo
    
    Then we get :
    
    can't read "savedErrorInfo": no such variable
        while executing
    "set ::errorInfo $savedErrorInfo"
    
    In init.tcl (unknown proc) , there are two ways to fix the issue. Either :
    
        catch {set $::errorInfo} savedErrorInfo
        catch {set $::errorCode} savedErrorCode
    
    Which will return :
    
    can't read "::errorInfo": no such variable
    
    When performing the "set errorInfo"
    
    The second solution being :
    
        if {[info exists ::errorInfo]} {
    set savedErrorInfo$::errorInfo
        } else {
    set savedErrorInfo""
        }
    
        if {[info exists ::errorInfo]} {
    set savedErrorCode$::errorCode
        } else {
    set savedErrorCode""
        }
    
    Which seems to be the cleanest one since it keeps the behaviour of Tcl 8.4
    
    Hope this helps
    
    DERF
    
  4. foundin changed to: "obsolete: 8.5.4"
  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: "mad_derf"
  10. subsystem changed to: "07. Variables"
  11. title changed to: "errorInfo variable is not set at tclsh init"
  12. type changed to: "Bug"