Skip to content

Loading…

DDC-2145: [GH-514] Improved exception when a type hint class can not be found #2834

Closed
doctrinebot opened this Issue · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of arnaud-lb:

Url: #514

Message:

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

Comment created by @beberlei:

A related Github Pull-Request [GH-514] was closed
#514

@doctrinebot

Comment created by @beberlei:

Duplicate of DDC-2064

@doctrinebot

Issue was closed with resolution "Duplicate"

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-514] was closed:
doctrine/dbal#514

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.