Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive in OverwrittenExitPointByFinallyRule for caught/handled exceptions #11906

Open
BHSPitMonkey opened this issue Oct 23, 2024 · 0 comments · May be fixed by phpstan/phpstan-src#3629
Labels
Milestone

Comments

@BHSPitMonkey
Copy link

Bug report

PHPStan reports This throw is overwritten by a different one in the finally block below., even when the thrown exception is handled by a catch block. Because the throw is handled, it should not be treated as an exit point (as it will never result in an exit).

Code snippet that reproduces the problem

https://phpstan.org/r/32143624-c2ee-414a-a97e-7251f54f1c85

Expected output

No errors

Did PHPStan help you today? Did it make you happy in any way?

Yep :spark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants