On 9 f=E9v, 09:51, Marco van de Voort <mar...@[EMAIL PROTECTED]
> wrote:
> On 2007-02-08, JP2R <jp-deza...@[EMAIL PROTECTED]
> wrote:
>
> >> try..finally ?
>
> > No - finalisation of procs are as finalisation for units - sort of
> > 'cleanup' and shut the doors
> > before leaving
> > This finalisation part can have an 'except' part, but not necessarily.
>
> try finally does the same thing when put over the entire procedure, and
> sysutils is hooked so that runtime errors are converted to exceptions:
>
> PROCEDURE xx;
>
> BEGIN
> try
> [code]
> finally
> [code2]
> end;
> END;
>
> means simply that [code2] is always run, even if [code] throws an
> exception/runtime error. Unless you mess up the stack *real* bad.
I had not fully understood FPC doc, thanks.
Is this true even if an exit statement is present in [code]


|