[RFC][Discussion] Using TidyException new type for tidy extension

php.internals

David CARLIER

310 days ago
Hi, I would like your opinion on a small addition for this extension, see below : https://wiki.php.net/rfc/tidyexception-for-tidy Cheers !

Jason Marble

310 days ago
Yes, please. On Sun, Oct 26, 2025 at 10:10 AM David CARLIER <devnexen@gmail.com> wrote:

Tim Düsterhus

307 days ago
Hi Am 2025-10-26 18:09, schrieb David CARLIER:
> https://wiki.php.net/rfc/tidyexception-for-tidy
Thank you for the RFC. I believe moving to Exceptions for error handling is the right thing, so I support the RFC in principle. However the proposal is *very* bare-bones. It would be useful to describe which errors can currently be emitted from ext/tidy, so that we can discuss a proper Exception hierarchy. In the PR I'm seeing just 3 locations - are those all of them? Naming-wise I wonder if we should go all the way to `\Tidy\TidyException` (i.e. with a namespace) right away. Best regards Tim Düsterhus

David CARLIER

305 days ago
Hi Tim, On Wed, 29 Oct 2025 at 13:06, Tim Düsterhus <tim@bastelstu.be> wrote:
> Hi > > Am 2025-10-26 18:09, schrieb David CARLIER: > > https://wiki.php.net/rfc/tidyexception-for-tidy > > Thank you for the RFC. I believe moving to Exceptions for error handling > is the right thing, so I support the RFC in principle. > > However the proposal is *very* bare-bones. It would be useful to > describe which errors can currently be emitted from ext/tidy, so that we > can discuss a proper Exception hierarchy. In the PR I'm seeing just 3 > locations - are those all of them? >
Yes.
> > Naming-wise I wonder if we should go all the way to > `\Tidy\TidyException` (i.e. with a namespace) right away. >
I would not mind going as far as to introduce a whole namespace if needs be. RFC updated.