Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-06-16
09:25 • Ticket [311e61d12a] No -errorcode for command lookup failure status still Cl... artifact: d2ad938328 user: dkf
09:24 • Closed ticket [311e61d12a]. artifact: 7e42042b5c user: dkf
09:24
[311e61d12a] Generate error code in *all* places where commands are looked up. check-in: 990eed5c11 user: dkf tags: trunk
09:22 • Ticket [311e61d12a] No -errorcode for command lookup failure status still Op... artifact: dc2488c6f6 user: dkf
09:19 • Ticket [311e61d12a]: 4 changes artifact: 30b7625ffa user: dkf
2014-06-12
01:28 • New ticket [311e61d12a]. artifact: 8489cfd6c8 user: andy

No -errorcode for command lookup failure

Closed / Fixed311e61d12ad1eb6355c13d2d2ed4acf1c45c4557Created 12 years agoUpdated 12 years ago
Descriptionplain2014-06-12 01:28:28
Command lookup failure doesn't generate a usable -errorcode.

% catch {asdf} msg options; set options
-code 1 -level 0 -errorstack {INNER {invokeStk1 asdf}} -errorcode NONE -errorinfo {invalid command name "asdf"
    while executing
"asdf"} -errorline 1

Problem reported on the Tcler's Wiki by samoc.  http://wiki.tcl.tk/_/diff?N=36745&V=10&D=9&W=0#diff0
Referenced by1
  • 990eed5c11[311e61d12a] Generate error code in *all* places where commands are looked up. check-in2014-06-16 09:24:39
dkfhtml2014-06-16 09:19:22

There are 5 places to fix/review.

bash$ grep 'invalid command name' */*.{c,tcl}
generic/tclBasic.c:                "invalid command name \"%s\"", TclGetString(objv[0])));
generic/tclExecute.c:		    "invalid command name \"%s\"", TclGetString(OBJ_AT_TOS)));
generic/tclNamesp.c:                "invalid command name \"%s\"", TclGetString(objv[1])));
generic/tclOODefineCmds.c:	    "invalid command name \"%s\"", soughtStr));
library/init.tcl:    return -code error "invalid command name \"$name\""

dkfhtml2014-06-16 09:22:12

And it's only unknown in init.tcl that needs fixing. Of course.

dkf Closed ticket [311e61d12a]. [History diff]2014-06-16 09:24:58
dkf Ticket [311e61d12a]: 4 changes [History diff]2014-06-16 09:25:54
Log in (anonymous is fine) to add a comment.