Skip to content

Improve developer experience: RuntimeException thrown by AbstractFactory::createObject now contains the reason. #26572

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

Merged
merged 5 commits into from
May 21, 2020

Conversation

marvinhinz
Copy link
Contributor

@marvinhinz marvinhinz commented Jan 29, 2020

This implements feature request #26550

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.

Description (*)

Fixed Issues (if relevant)

  1. Fixes Any reason for not printing Exception Message in ObjectManager\Factory\AbstractFactory::createObject? #26550: Any reason for not printing Exception Message in ObjectManager\Factory\AbstractFactory::createObject?

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • [x ] Pull request has a meaningful description of its purpose
  • [x ] All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

…ory::createObject now contains the reason.

This implements feature request magento#26550
@m2-assistant
Copy link

m2-assistant bot commented Jan 29, 2020

Hi @marvinhinz. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@marvinhinz
Copy link
Contributor Author

@kandy @buskamuza are tests needed to merge this? thank you!

@marvinhinz
Copy link
Contributor Author

bump

@marvinhinz
Copy link
Contributor Author

@kandy @buskamuza ? :)

@thampe
Copy link

thampe commented May 5, 2020

Hi,

is there any progeress on this?

@marvinhinz
Copy link
Contributor Author

@ihor-sviziev maybe you could take a look at this too? I still encounter this problem often while developing. It would be really nice to have this merged! :)

@ghost ghost assigned kandy May 8, 2020
@ihor-sviziev ihor-sviziev added Component: Framework/ObjectManager Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Release Line: 2.4 labels May 8, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7532 has been created to process this Pull Request

@ihor-sviziev ihor-sviziev added the Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. label May 8, 2020
@engcom-Alfa engcom-Alfa self-assigned this May 13, 2020
Copy link
Contributor

@engcom-Alfa engcom-Alfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marvinhinz Could you fix the failed static tests? Thanks!

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7532 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Before:
Screenshot from 2020-05-14 14-28-08

After: ✔️ with exception message
Screenshot from 2020-05-14 14-29-49

@engcom-Charlie
Copy link
Contributor

Hi @ihor-sviziev, please review the test coverage.

@ihor-sviziev ihor-sviziev added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests labels May 15, 2020
Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Approved ✔

Thx for covering it, I thought it will be too hard

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7532 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@slavvka slavvka added the Priority: P3 May be fixed according to the position in the backlog. label May 19, 2020
@slavvka slavvka added this to the 2.4.1 milestone May 19, 2020
slavvka added a commit that referenced this pull request May 21, 2020
… AbstractFactory::createObject now contains the reason. #26572
@slavvka slavvka merged commit e31db8c into magento:2.4-develop May 21, 2020
@m2-assistant
Copy link

m2-assistant bot commented May 21, 2020

Hi @marvinhinz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: ObjectManager Priority: P3 May be fixed according to the position in the backlog. Progress: accept Release Line: 2.4 Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any reason for not printing Exception Message in ObjectManager\Factory\AbstractFactory::createObject?
8 participants