Hi
Am 2026-04-22 20:28, schrieb Larry Garfield:
## Ways of handling a single method's returns
Possible ways to do so off the top of my head, in no particular order:
I don't currently have the time to digest this email in detail, but I
wanted to mention an alternative you didn't before I forget: Making the
exception an in-out parameter. That would be functionally similar to a
return value, but more strongly default to “don't make a change”,
because “doing nothing” will just work.
i.e.
public function exitContext(?\Throwable &$e): void {
// Assign null to suppress.
$e = null;
}
Best regards
Tim Düsterhus