Skip to content

report swallowed exception #5627

@staabm

Description

@staabm

Feature request

A exception thrown is swallowed when the finally block contains a return.
I would expect a error regarding the thrown exception will be swallowed by the php runtime.

today we debugged a class and realized that our exceptions won't get thrown because of such a "finally-return".. its really suprising

https://3v4l.org/OiVkG#v7.4.23
https://phpstan.org/r/8685c7b2-5a0e-4fbb-9e46-dfcca31559b1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions