Smart pascal source code
try
WriteLn('Hello');
except
WriteLn('BUG');
finally
WriteLn(' World');
end;
try
raise new Exception('DOH');
except
WriteLn('Exception ');
finally
WriteLn('World');
end;
type
EMyExcept = class(Exception)
end;
try
raise new EMyExcept('Bye');
except
on E: EMyExcept do
WriteLn(E.Message)
else
WriteLn('Bug');
finally
WriteLn(' World');
end;
{<<< RESULT - CONSOLE LOG >>>
-----------------------------
Hello World
Exception World
Bye World
-----------------------------
{<<<<<<<<< THE END >>>>>>>>>}