Hey Mihail

Am 06.08.25 um 13:34 schrieb Mihail Liahimov:
Hi!

At the moment, I can suggest this syntax:

try {
// do something
} catch (SomeIgnorableException) finally {
// do something
}

I find that ... challenging

When reading the code I now have to go to the end of the line to understand that the second

// do something

does not belong to the `try` but to the `finally`...


And

try {
  // break stuff
} catch (SomeIgnorableException)
finally {
  // do something regardless
}

seems boken due to the missing }

But well....

We just have to adapt to something like this:

try {
  // break stuff
}
catch (SomeIgnorableException)
catch (Some OtherIgnorableException)
finally {
  // do something regardless
}

--
                                                              ,,,
                                                             (o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl                                                       |
| mailto:andr...@heigl.org                  N 50°22'59.5" E 08°23'58" |
| https://andreas.heigl.org                                           |
+---------------------------------------------------------------------+
| https://hei.gl/appointmentwithandreas                               |
+---------------------------------------------------------------------+
| GPG-Key: https://hei.gl/keyandreasheiglorg                          |
+---------------------------------------------------------------------+

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to