Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Correct upvar and uplevel error message

Open1639858fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 19 years ago
Descriptionplain2007-01-19 21:02:21
upvar and uplevel give misleading error message when level argument is defaulted to 1 but doesn't exist. For example:
% upvar x y
bad level "x"
% uplevel puts Hello
bad level "puts"

The patch alters TclGetFrame routine to remedy that, so the message is:

bad level "1"

{ [email protected] }
nobodyplain2007-01-20 04:02:24
File Added - 212117: tcl-8.4.13-upvar-msg.patch
dkf Ticket [1639858fff]: 2 changes [History diff]2007-01-20 04:20:25
msofer Ticket [1639858fff]: 1 change [History diff]2007-09-11 01:38:42
msoferplain2007-10-28 09:10:11
Logged In: YES 
user_id=148712
Originator: NO

The error message would be misleading for
  upvar x a b
Log in (anonymous is fine) to add a comment.

Attachments: