mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #514] [CLOSED] Improved exception when a type hint class can not be found #8312
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/514
Author: @arnaud-lb
Created: 11/14/2012
Status: ❌ Closed
Base:
2.3← Head:clearer-exception📝 Commits (1)
d0e15b1Improved exception when a type hint class can not be found📊 Changes
3 files changed (+44 additions, -1 deletions)
View changed files
📝
lib/Doctrine/ORM/Proxy/ProxyException.php(+9 -0)📝
lib/Doctrine/ORM/Proxy/ProxyFactory.php(+13 -1)📝
tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php(+22 -0)📄 Description
This improves the exception message when a type hint class was not found during the generation of a proxy.
Example:
When generating a proxy for this class
Foo, if the type hint classInvalidClasscannot be found, aReflectionExceptionexception 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.