Tcl Source Code

View Ticket
Login
Ticket UUID: 1639858
Title: Correct upvar and uplevel error message
Type: Patch Version: None
Submitter: nobody Created on: 2007-01-19 21:02:21
Subsystem: 07. Variables Assigned To: msofer
Priority: 5 Medium Severity:
Status: Open Last Modified: 2007-10-28 09:10:11
Resolution: None Closed By:
    Closed on:
Description:
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] }
User Comments: msofer added on 2007-10-28 09:10:11:
Logged In: YES 
user_id=148712
Originator: NO

The error message would be misleading for
  upvar x a b

nobody added on 2007-01-20 04:02:24:

File Added - 212117: tcl-8.4.13-upvar-msg.patch

Attachments: