<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">J. Gareth Moreton via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> schrieb am Do., 6. Mai 2021, 20:03:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The rule with try...finally is that, outside of something completely <br>
catastrophic that destroys the program flow, is that once you enter the <br>
try part, the finally part is guaranteed to be executed no matter how <br>
you leave it.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">There are two exceptions (pun not intended :P ):</div><div dir="auto"><br></div><div dir="auto">- Halt (or any other OS function that never returns and terminates the process) </div><div dir="auto">- LongJmp (because that knows nothing about exception handlers) </div><div dir="auto"><br></div><div dir="auto">Other than that, you're right and what Ryan is trying to do is definitely the intended purpose of try ... finally.</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven</div></div>