[fpc-pascal] Food for thought - language string improvement

Sven Barth pascaldragon at googlemail.com
Mon Jul 10 17:19:23 CEST 2017

Am 10.07.2017 15:46 schrieb "Graeme Geldenhuys" <
mailinglists at geldenhuys.co.uk>:
> On 2017-07-10 13:34, Dmitry Boyarintsev wrote:
>> are you referring to "Catching More Than One Type of Exception with One
>> Exception Handler" in
>> https://docs.oracle.com/javase/tutorial/essential/exceptions/catch.html
> Yes. You can have multiple catch blocks inside the same try block. You
can also have a single catch block with a comma separated list of exception

You can catch multiple exception types in Object Pascal as well:

=== code begin ===

  on e: EWhatever do ...;
  on e: EFoobar do ...;
  else ...

=== code end ===

Though you can't use the same code block for multiple types.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170710/cb93f2c3/attachment.html>

More information about the fpc-pascal mailing list