-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Any reason for not printing Exception Message in ObjectManager\Factory\AbstractFactory::createObject? #26550
Comments
Hi @marvinhinz. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @marvinhinz do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @sdzhepa |
…ory::createObject now contains the reason. This implements feature request magento#26550
Hi @marvinhinz. Thank you for your report.
The fix will be available with the upcoming 2.4.0 release. |
Based on the provided information internal tickets |
✅ Confirmed by @sdzhepa Issue Available: @sdzhepa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Summary (*)
When debugging an error that prevents object creation, the original exception message is not printed, its just logged. I think it would improve the developer experience when working on cli code, to see the message instantly and not having it to look up in the log.
Source of the RuntimeException:
magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php::createObject
Examples (*)
CLI Output:
system.log:
[2020-01-27 11:36:15] main.CRITICAL: Type Error occurred when creating object: Leonex\Import\Model\Transformer\ProductData\Categories, Too few arguments to function Leonex\ETL\Logger\AbstractLog::__construct(), 0 passed in /srv/projects/rb/htdocs/magento/app/code/Leonex/Import/Model/Transformer/ProductData/Categories.php on line 63 and exactly 1 expected [] []
Proposed solution
Printing the exception message too.
The text was updated successfully, but these errors were encountered: