Can a developer check if Exit was called?
try
{do some stuff}
If Condition then
Exit;
finally
{Can I check here if Exit was called without checking Condition again?}
end;
Can a developer check if Exit was called?
try
{do some stuff}
If Condition then
Exit;
finally
{Can I check here if Exit was called without checking Condition again?}
end;
Can I check here if
Exitwas called without checkingConditionagain?
No. If checking Condition again is expensive, or has side-effects, then you can use a local variable to indicate that Condition was True.
var
LCondition: Boolean;
...
LCondition := False;
try
// do stuff
LCondition := Condition;
if LCondition then
Exit;
finally
// now check LCondition
end;