Description
This issue is automatically created based on existing pull request: #37570: Avoid lots of uncessary exceptions during layout XML merge loading
Description
- Introduce a new function (for B/C compat we don't overwrite the protected _loadXmlString) to load and not throw an exception
- Use it in extract handlers -> no need to catch the exception any more
Related Pull Requests
See also: justbetter/magento2-sentry#113
Fixed Issues (if relevant)
No magento issue created.
Manual testing scenarios (*)
- Install the sentry plugin
- Have some invalid XML there
- Exception is reported, even it is not necessary
Reason
When using tools like Sentry, because of there inner workings, such exceptions still might be reported. While this is not exactly the root cause, it's always cleaner to not throw an exception and immediately catch it, if invalid cases can happen often.
This might even improve performance a bit and improves developer's experience.
Remarks
There seems some invalid XML at that place in the code happen quite often - it might be also interesting to check if that can be avoided.
This is a simple, trivial change to the code and should not break anything, so hopefully this can get triaged quickly and without to much back-and-forth about the testing procedure :-)
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- [not applicable] All new or changed code is covered with unit/integration tests (if applicable)
- [not applicable] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- [waiting] All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status