Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2006-09-26
23:34 • Closed ticket [1565810fff]: namespace inscope & errorInfo plus 7 other c... artifact: cd55f7c427 user: dgp
15:37 • New ticket [1565810fff]. artifact: 21f5d61513 user: aborthwi

namespace inscope & errorInfo

Closed / Wont Fix1565810fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-09-26 15:37:13
if [::unknown] traps an error when handling a
"namespace inscope" command it does not set errorInfo.

init.tcl

    if {[regexp "^:*namespace\[ \t\n\]+inscope" $cmd]
&& [llength $cmd] == 4} {
        set arglist [lrange $args 1 end]
        set ret [catch {uplevel 1 ::$cmd $arglist} result]
        if {$ret == 0} {
            return $result
        } else {
            #return -code $ret -errorcode $errorCode
$result
            return -code $ret -errorcode $errorCode
-errorinfo $errorInfo $result
        }
    }
dgpplain2006-09-26 23:34:45
Logged In: YES 
user_id=80530


That code in [unknown] is
a workaround for alleged
brokenness in Itcl.  No correctly
written code should ever end up
there.

If you do end up there, your
program is probably missing an
{expand} or an [eval] where one
is needed.  Correct that.

The only fix I plan to ever make
to that bit of code is its removal.
Log in (anonymous is fine) to add a comment.