Tcl Source Code

View Ticket
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA
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
Exceptions encountered during substitutions during
direct evaluation (as done by [eval]) are always
converted to errors:

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

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

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 

TIP 56 is approved; patch is committed.

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

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 has been

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

File Added - 10708: patch455151.txt

Logged In: YES 

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

Donal: could you please review the modification to tclCmdMZ

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

File Added - 10088: parse.bench

Logged In: YES 

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 

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 

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

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

File Added - 9961: parse.patch