Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003577 [JEDI VCL] 00 JVCL Components major always 2006-03-14 05:32 2006-03-20 04:53
Reporter ivan_ra View Status public  
Assigned To AHUser
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version 3.30 Product Version 3.10
  Target Version Product Build
Summary 0003577: JvInterpreter: incorrect finally/except block handling (workaround)
Description for scripts having "Exit" statement inside "try" block Jvinterpreter executes only first statement from finally/except block. This is example:

procedure TestScript;
var
  StringList:TStringList;
begin
  StringList:=TStringList.Create;
  try
    Exit;
  finally
    ShowMessage('one'); // 1
    ShowMessage('two'); // 2
    StringList.Free; //3
  end;
end;

In this script JvInterpreter executes only first statement
Steps To Reproduce
Additional Information The cause of problem is incorrect using of FExit flag in TJvInterpreterFunction.InterpretTry.DoFinallyExcept procedure. It calls InterpretBegin and InterpretBegin exits after first statement because FExit=true.
DoFinallyExcept must save FExit, substitute it and restore in on exit:

  procedure DoFinallyExcept(E: Exception);
  var OldExit:boolean;
  begin
    OldExit:=FExit;
    try
      FExit:=false;
      ...
    finally
      FExit:=FExit or OldExit;
    end;
  end;
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0008663)
ivan_ra (developer)
2006-03-14 05:35

I can not make patch right now because anonimous CVS not working. May be later
(0008704)
AHUser (developer)
2006-03-20 04:53

Fixed in CVS.

- Issue History
Date Modified Username Field Change
2006-03-14 05:32 ivan_ra New Issue
2006-03-14 05:35 ivan_ra Note Added: 0008663
2006-03-20 04:53 AHUser Status new => resolved
2006-03-20 04:53 AHUser Resolution open => fixed
2006-03-20 04:53 AHUser Assigned To => AHUser
2006-03-20 04:53 AHUser Note Added: 0008704


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker