uses System.SysUtils;
procedure ThrowIfTrue(Param: Boolean);
begin
//no "else" for try: the tail of the
//protected block runs only when
//nothing was raised
try
if Param then
raise Exception.Create('test');
WriteLn('else');
except
WriteLn('except');
end;
end;
begin
ThrowIfTrue(True);
//printed: 'except'
ThrowIfTrue(False);
//printed only 'else'
end.