[Lazarus] About try blocks

svaa svaa at ciberpiula.net
Tue Mar 17 19:16:40 CET 2009


Hello:

A little off-topic and probably just a stupid idea.

I have wondered many times why there are two different sentences to
handle an exception and to clean objects etc. I have missed many times
in database work.

I mean:

try
  try
   ......
  except
   <handle>
  end;
finally
  <clean>
end;

It would cleaner if it could be written:

try
   ......
except
  <handle>
finally
  <clean>
end;


I suppose there is a misconception in my idea and it is deadly stupid,
because Borland  must have had good reasons to design it with two
separated blocks, but I can't guess why.

Santiago A.







More information about the Lazarus mailing list