Have a look on Mage::printException()
. Mainly it has two parts and I will give you a brief Idea.
public static function printException(Exception $e, $extra = '')
{
if (self::$_isDeveloperMode) {
print '<pre>';
if (!empty($extra)) {
print $extra . "\n\n";
}
print $e->getMessage() . "\n\n";
print $e->getTraceAsString();
print '</pre>';
} else {
$reportData = array(
!empty($extra) ? $extra . "\n\n" : '' . $e->getMessage(),
$e->getTraceAsString()
);
// retrieve server data
if (isset($_SERVER)) {
if (isset($_SERVER['REQUEST_URI'])) {
$reportData['url'] = $_SERVER['REQUEST_URI'];
}
if (isset($_SERVER['SCRIPT_NAME'])) {
$reportData['script_name'] = $_SERVER['SCRIPT_NAME'];
}
}
// attempt to specify store as a skin
try {
$storeCode = self::app()->getStore()->getCode();
$reportData['skin'] = $storeCode;
}
catch (Exception $e) {}
require_once(self::getBaseDir() . DS . 'errors' . DS . 'report.php');
}
die();
}
So when Developer Mode is on, this is what happens.
if (self::$_isDeveloperMode) {
print '<pre>';
if (!empty($extra)) {
print $extra . "\n\n";
}
print $e->getMessage() . "\n\n";
print $e->getTraceAsString();
print '</pre>';
}
die();
In short, it prints the error on the browser and then die.
But if it is not in developer mode, it will actually log the error (actually more details) in var/report/
directory.
You have specified in your question that, module which is responsible for triggering Mage::printException()
is used as a part of ajax request. I think this is why you are not viewing the printed error on your browser (since you are in developer mode). Most probably you can see the error in your Browser console.