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

- Thread: https://externals.io/message/128969
- Original archive: https://news-web.php.net/php.internals/128969
- Started by David CARLIER on 2025-10-26T17:09:15+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #128969 — David CARLIER — 2025-10-26T17:09:15+00:00

URL: https://externals.io/message/128969#128969

Hi,

I would like your opinion on a small addition for this extension, see below
:

https://wiki.php.net/rfc/tidyexception-for-tidy

Cheers !

---

## #128970 — Jason Marble — 2025-10-26T17:22:21+00:00

URL: https://externals.io/message/128969#128970 · In reply to: #128969

Yes, please.



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

---

## #128995 — tim@bastelstu.be — 2025-10-29T13:06:13+00:00

URL: https://externals.io/message/128969#128995 · In reply to: #128969

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

---

## #129020 — David CARLIER — 2025-10-31T09:42:48+00:00

URL: https://externals.io/message/128969#129020 · In reply to: #128995

Hi Tim,




> Hi
>
> Am 2025-10-26 18:09, schrieb David CARLIER:
> > […]
>
> 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.

>
> Best regards
> Tim Düsterhus
