Skip to content

Better di generation error message #8709

@spipu

Description

@spipu

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.php#L36

by this one:

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

Regards,

Laurent

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions