-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDC-260: Add additional info to ReflectionException in ClassMetadata #3330
Comments
Comment created by romanb: I dont think that would be overly useful as the exceptions from php are pretty good. Can you show an example of the error, the message you get and the improved message you would like to get instead? |
Comment created by shurakai: Hi Roman, i ran the doctrine CLI tool and tried "schema-tool". One of my PHP entities classes hadn't all properties defined in my YAML files (I'm wondering why Doctrine needs to perform Reflection on my PHP classes when converting from YAML...?) and I recieve this error: {quote} PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Property children does not exist' in /var/workspaces/project/library/Doctrine/ORM/Mapping/ClassMetadata.php:244 The problem here is, that I'm not told in which class the problem occurs because PHP automatically shortens the parameters displayed. Therefore, I need to guess, and thats definitely something I don't want to do. The errormessage I'd like to see: . The error occurred in class . So in this case: {quote}Property children does not exist. The error occurred in class Core\Block\Item\Panel\AbstractPanel{quote} |
Comment created by shurakai: This should fix this issue |
Comment created by @guilhermeblanco: In r7041 this issue was fixed. Thanks for the patch! |
Issue was closed with resolution "Fixed" |
Imported 1 attachments from Jira into https://gist.github.com/9b82263fa4659f96cab3 |
Jira issue originally created by user shurakai:
I was thinking about adding an additional exception to the ClassMetadata class. For example when using reflection for recieving an attribute and an exception is raised (for example because the attribute does not exist), the debug information could be improved. I thought one could catch the ReflectionException and throw a DoctrineReflectionException or something like that and add some additional information like what the name of the currently processed class is
The text was updated successfully, but these errors were encountered: