[DDC-2145] [GH-514] Improved exception when a type hint class can not be found Created: 14/Nov/12  Updated: 25/Nov/12  Resolved: 25/Nov/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Duplicate Votes: 0
Labels: None


 Description   

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

Url: https://github.com/doctrine/doctrine2/pull/514

Message:

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

Example:

``` php
<?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.



 Comments   
Comment by Benjamin Eberlei [ 14/Nov/12 ]

A related Github Pull-Request [GH-514] was closed
https://github.com/doctrine/doctrine2/pull/514

Comment by Benjamin Eberlei [ 25/Nov/12 ]

Duplicate of DDC-2064

Generated at Sat May 18 12:44:17 UTC 2013 using JIRA 5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5.