Skip to content
Tcl Source Code View Ticket
Login

View Ticket

inconsistent error codes for bad levels

Closed / Fixedc95b9fc0e35a1cddcd877f02e5218054d1be8254Created 11 years agoUpdated 10 years ago
Descriptionplain2016-04-05 02:48:55
There are several places where Tcl has to parse
a "level" to indicate some Frame, but when something
goes wrong a hodge-podge of different error codes
are used, even though the same error message is
in place: 'bad level "bad"'

[info frame bad] raises TCL LOOKUP STACK_FRAME

[info level bad] raises TCL LOOKUP STACK_LEVEL

[upvar bad x y] raises TCL VALUE LEVEL

[upvar -1 x y] raises TCL VALUE STACKLEVEL

If there's a sense to this, I'm not seeing it.
Referenced by2
dgp Ticket [c95b9fc0e3]: 3 changes [History diff]2016-06-20 22:02:14
dkfhtml2016-06-22 15:19:14

I'll unify the various things so that it is always TCL LOOKUP LEVEL bad because those were unnecessarily different, but there's no guarantee that you won't see strangeness anyway.

dkfhtml2016-06-22 20:58:57

Fixed for 8.6 and trunk; be aware that other codes can still happen in some cases.

Log in (anonymous is fine) to add a comment.