cancel
Showing results for 
Search instead for 
Did you mean: 

Better di generation error message

0 Kudos

Better di generation error message

Feature request from spipu, posted on GitHub Feb 28, 2017

Hi,

I generate the di with the following command :

bin/magento setup:di:compile

If a error occurs, it display the reflexion error, but it does not give the name of the class that has the error.

Example: just change the asked type of a parameter of any constructor class to one type that does not exist, and launch the di compilation. You will have that kind of error:

[ReflectionException]                            
  Class Smile\Map\Model\Map\string does not exist  

The verbose mode does not help.

A good think could be to change this line:

https://github.com/magento/magento2/blob/2.1/lib/internal/Magento/Framework/Code/Reader/ClassReader....

by this one:

$message = $e->getMessage().' on ['.$className.']';

Regards,

Laurent