Re: [RFC] [Discussion] PREG_THROW_ON_ERROR
| From: | B.J.Scharp | Date: | Thu, 30 Jul 2026 00:21:29 +0000 |
| Subject: | Re: [RFC] [Discussion] PREG_THROW_ON_ERROR | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132129@lists.php.net to get a copy of this message | ||
On 28-07-2026 2:56 AM, Osama Aldemeery wrote:
Hi all,
The exception name is settled from the pre-RFC asFrom the RFC:\PregException(thanks Tim) and the flag asPREG_THROW_ON_ERROR.
The flag covers both classes of PCRE failure.have you considered throwing different Exception types for the two failure types? (e.g. PregExecutionException and PregCompilationException) You could have both be child classes of PregException, but in actual fact, the second should probably be a child of LogicException, while the former really is a RuntimeException... Regards, Bernard