Tcl Source Code

View Ticket
Login
Ticket UUID: 455151
Title: [eval] returns wrong exception code
Type: Bug Version: None
Submitter: msofer Created on: 2001-08-24 23:54:19
Subsystem: 45. Parsing and Eval Assigned To: msofer
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-09-13 18:59:28
Resolution: Fixed Closed By: msofer
    Closed on: 2001-09-13 11:59:28
Description:
Exceptions encountered during substitutions during
direct evaluation (as done by [eval]) are always
converted to errors:

[mig@mini generic]$ tclsh8.0
% info patch
8.0.5
% catch {w[continue]}
4
% catch {eval {w[continue]}}
4

[mig@mini generic]$ ../unix/tclsh
% info patch
8.4a4
% catch {w[continue]}
4
% catch {eval {w[continue]}}
1

This is probably the cause of bugs #219181 and #219384.

The enclosed patch is *incomplete* - missing function
declarations in the stub tables. It does fix this bug.
User Comments: msofer added on 2001-09-13 18:59:28:
Logged In: YES 
user_id=148712

TIP 56 is approved; patch is committed.

dkf added on 2001-09-13 15:43:38:
Logged In: YES 
user_id=79902

If evaluating the tokens resulting from a variable
substitution can never produce an error code other than
TCL_OK or TCL_ERROR (and you get clean compilation and the
test suite works, of course, but those are aspects you don't
need me to check for you) then it looks OK to me.  The basic
principle of the changes in my area is certainly a good'un.

(Noting that TIP#56 http://purl.org/tcl/tip/56 has been
accepted.)

msofer added on 2001-09-13 01:21:47:

File Added - 10708: patch455151.txt

Logged In: YES 
user_id=148712

Patch is updated - the previous slot in the stubs table was
used in the meantime.

Donal: could you please review the modification to tclCmdMZ
(Tcl_SubstObjCmd)?

msofer added on 2001-08-28 18:42:27:

File Added - 10088: parse.bench

Logged In: YES 
user_id=148712

The patch has just about no effect on execution speed - a
difference is only seen when [eval]ing mixed lists.

msofer added on 2001-08-28 18:39:27:

File Deleted - 9961: 



File Added - 10087: patch455151.txt

Logged In: YES 
user_id=148712

Enclosed is a complete patch. A TIP will be submitted, as
the patch involves the definition of a new public function.

msofer added on 2001-08-25 07:06:59:
Logged In: YES 
user_id=148712

The patch fixes bug #219384, but not #219181.

msofer added on 2001-08-25 06:54:19:

File Added - 9961: parse.patch

Attachments: