Magento: Manually Getting Magento Error Trace

Magento Icon

I am working on a module right now that is supposed to email me the details of any errors that happen in Magento (errors that throw the Magento error screen, and output a trace of the error). Getting the error itself is quite easy. The file for that is /app/code/core/Mage/Core/functions.php, with the method mageCoreErrorHandler(). What I can’t figure out is how to get the trace of the error. That seems to be output from this file: /errors/process.php, which I don’t believe able to be overridden by any custom modules.

If any of you have any ideas, please let me know. Otherwise, when I figure it out, I’ll post the solution.

This entry was posted in Magento, PHP. Bookmark the permalink.

2 Responses to Magento: Manually Getting Magento Error Trace

  1. Can’t you just rename /errors/local.xml.sample to local.xml and then open it and set it to email?

    • Josh Pratt says:

      Paul: Ahh, I didn’t even think of that. I’ll have to try it out and see how it works. The only thing though is that this will not work for any version of Magento earlier than 1.4. At this point, I would need the ability to send error reports via email for versions all the way down to 1.2 or 1.1.