add a note add a note

User Contributed Notes 2 notes

up
0
moneylovin-i1 at protonmail dot com
3 years ago
O2:We were unable to process your last payment. In order to avoid fees, please update your information via:https://accounts.o2.co.uk/signin
up
-63
Anonymous
6 years ago
This is list is missing a link for:
try ... catch ... finally
blocks.

You will find this critical language construct hidden away in the "Exceptions" chapter.

And, even though being very verbose and admittedly having useful code examples, that Exceptions chapter actually never formally defines the syntax of the catch block. Per example, if we don't care about accessing the Exception object, one might attempt:

   try { ... } catch { ... } ...

or even:

   try { ... } catch() { ... } ...

Apparently the only acceptable syntax is:

   try { ... }
    catch( \Exception | OptionalMyExceptions-1 | ... $exception_instance ) { ... }
    /* optional additional catch blocks */
    catch( ... ) { ... }
    ...
    /* optional finally block */
    finally { ... }
To Top