Skip to content

feature request: make sure an exception is used #3844

@enumag

Description

@enumag

Feature request

In my code I'm using some static exception factory methods similar to Doctrine's ORMException. For instance:

Today I found out that in some cases my code only called the method but did nothing with the returned exception - the throw statement was missing.

I'd like PHPStan to tell me about these "unused exception" cases.

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