Why does magento2 display errors mostly related to core instead of the custom module files where core is extended?

When we extend a core module/controller, say loginPost, and if some error occurs, why does Magento2 show most core level errors,and some times a single line of our custom extended file?

Can somebody here answer in detail.

Solutions

I assume that when you change some functionality, your new class still extends the original core class.
In this case, if a (public or protected) method is called from your class and that class does not override the core method, the original method is called.
If that original method has an error the debug back trace will obviously report it in the core class.
This is not a magento specific case. It is how php works.
If the call to a core method is done from your own class, then you will get in the debug trace a line with your class in it.

Tags: Magento 2.x

Similar questions

Hide custom UI element in extended XML file in custom theme
This is original file in code dir of a third part module: I want to hide the element but extending the XML layout file in my custom theme. This is my extended XML file, however, I can't get it to work... Element is still visible on the frontend. Is it even possible to hide the element by extending the XML file or do I have to create a custom module...
Remove <values> option from an extended module
we have a general module which implements some widget functionality and adds basic templates to a shop, which are defined in the widget.xml like this: We use that basic configuration a lot, but now want to remove one of the entires in in a child extension, which are usually just used to add more project specific templates, but should this time also...
Cannot override local model - Module loaded but Model is not extended
The extension I am attempting to override is installed to the local folder. The extension information: My Module Information: Extended ModeL: app/etc/modules/AimlessMedia_XtentoOrderExportMod.xml
Block not rendering when extended and module output disabled
I've got a module with this rewrite in Magento 1.9.1.0 to change the checkout url in a nice way: <blocks> <checkout> <rewrite> <onepage_link>RD_ModuleName_Block_Onepage_Link</onepage_link> </rewrite> </checkout> </blocks> And this block: <?php class RD_ModuleName_Block_Onepage_Link extends Mage_Che...
How do I find API User name inside extended API module code?
I have extended out the Magento API so that I can intercept sales_order.list and not expose all orders to a third party API. This worked fine when only one service was using this API, now there is another 'consumer' of the sales_order.list and I need to differentiate between whom is logged in. I would prefer to do this the proper Magento way, e.g. ...
Extended Module for Subscription Newsletter in Magento 2
I have extend a module for subscription newsletter in magento 2 for change in NewAction.php file. After enabling the Module it doesn't work As, i want to remove newsletter popup on subscription success. My di.xml file is My module.xml file is but it didn't work for me.

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.