Skip to content

Improved exception when a type hint class can not be found#514

Closed
arnaud-lb wants to merge 1 commit intodoctrine:2.3from
arnaud-lb:clearer-exception
Closed

Improved exception when a type hint class can not be found#514
arnaud-lb wants to merge 1 commit intodoctrine:2.3from
arnaud-lb:clearer-exception

Conversation

@arnaud-lb
Copy link
Contributor

This improves the exception message when a type hint class was not found during the generation of a proxy.

Example:

<?php
class Foo
{
    function test(\InvalidClass $param) 
    {
    }
}

When generating a proxy for this class Foo, if the type hint class InvalidClass cannot be found, a ReflectionException exception is thrown with the following message: Class InvalidClass does not exist. There is no hint on the real cause of the error (which class, method, ...).

This PR wraps this exception with a message making the cause of the exception more obvious.

@doctrinebot
Copy link

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DDC-2145

@doctrinebot
Copy link

Oh btw, I just (automatically) realized that you are not creating this pull request against the master branch.

Unless there are good reasons for this, i would suggest to close and rebase the Pull Request against master and then create it again. Sorry!

@arnaud-lb
Copy link
Contributor Author

closing because duplicate of PR 469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants