# [RFC] Non-capturing catches

- Thread: https://externals.io/message/109550
- Original archive: https://news-web.php.net/php.internals/109550
- Started by Max Semenik on 2020-04-07T13:17:52+00:00
- Messages: 3
- RFC: Non-capturing catches (Implemented (PHP 8.0)) — https://externals.io/rfc/non-capturing_catches.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #109550 — Max Semenik — 2020-04-07T13:17:52+00:00

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

Hiya, I'd like to present a new RFC for your consideration:
https://wiki.php.net/rfc/non-capturing_catches

Briefly, I want to be able to do the following:

try {
    foo();
catch (SomeExceptionClass) {
    bar();
}

Please share your thoughts! :)

-- 
Best regards,
Max Semenik

---

## #109559 — Stanislav Malyshev — 2020-04-08T01:33:30+00:00

URL: https://externals.io/message/109550#109559 · In reply to: #109550

Hi!


> Hiya, I'd like to present a new RFC for your consideration:
> https://wiki.php.net/rfc/non-capturing_catches
> 
> Briefly, I want to be able to do the following:
> 
> try {
>     foo();
> catch (SomeExceptionClass) {
>     bar();
> }

Looks good to me.

-- 
Stas Malyshev
smalyshev@gmail.com

---

## #109916 — Max Semenik — 2020-04-29T12:49:23+00:00

URL: https://externals.io/message/109550#109916 · In reply to: #109550

Just a heads up, I'll put https://wiki.php.net/rfc/non-capturing_catches up
for vote in a couple of days.
-- 
Best regards,
Max Semenik
