I'm sorry if this is a bleedingly obvious question. I think I am going crazy.
I have code that I know is stopping at a specific point. The file I am looking at is app/code/core/Mage/Downloadable/Helper/Download.php
(NB. yes, I totally understand and agree that I should not be fiddling with core, but this is just my playing around in a locally installed Magento, and going to be reverted back afterwards)
The line that the code is breaking at is:
if (!isset($urlProp['scheme']) || strtolower($urlProp['scheme'] != 'http')) {
Mage::throwException(Mage::helper('downloadable')->__('Invalid download URL scheme.'));
}
It is not getting past the Mage::throwException line. I know this because I am logging comments (to my own custom log file) before and after that line, and only the comments before that line are being logged.
My question is not why I am getting this specific error for this specific bit of code - but why I am not seeing the Invalid download URL scheme.
error ANYWHERE. It is not appearing in my browser when the code is run, and it is not appearing in exception.log (that file actually does not exist in var/log - nor does system.log). Am I right in thinking that I should be seeing that error somewhere? It is making debugging very difficult!
Here's what I've done to try and get errors showing:
- In System/Configuration/Advanced/Developer/Log Settings - Set "Enabled" to "Yes".
- In
index.php
, I have gotMage::setIsDeveloperMode(true);
- In
index.php
, I have gotini_set('display_errors', 1);
I know this is working because if I force a syntax error, I get an error in browser. - In
/errors
, I have renamedlocal.xml.sample
tolocal.xml
(not sure what this one does but have seen it in a couple of articles to do with exception printing). - I have checked that
var/log
is writable. I know this is working because there is another custom log file that I am writing to successfully withMage::log
Any ideas greatly welcomed! What should Mage::throwException
actually be doing - printing in browser, or in exception.log, or both?
I am using Magento CE 1.9.0.1 on localhost (using a Mac with MAMP).
app/etc/local.xml
is actually nothing bad. Read about it here: stackoverflow.com/questions/4360574/…