本文整理汇总了PHP中AO::printException方法的典型用法代码示例。如果您正苦于以下问题:PHP AO::printException方法的具体用法?PHP AO::printException怎么用?PHP AO::printException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AO
的用法示例。
在下文中一共展示了AO::printException方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _loadAttributes
/**
* Load attributes into loaded entities
*
* @return Mage_Eav_Model_Entity_Collection_Abstract
*/
public function _loadAttributes($printQuery = false, $logQuery = false)
{
if (empty($this->_items) || empty($this->_itemsById) || empty($this->_selectAttributes)) {
return $this;
}
$entity = $this->getEntity();
$entityIdField = $entity->getEntityIdField();
$tableAttributes = array();
foreach ($this->_selectAttributes as $attributeCode => $attributeId) {
$attribute = AO::getSingleton('eav/config')->getCollectionAttribute($entity->getType(), $attributeCode);
if ($attribute && !$attribute->isStatic()) {
$tableAttributes[$attribute->getBackendTable()][] = $attributeId;
}
}
foreach ($tableAttributes as $table => $attributes) {
$select = $this->_getLoadAttributesSelect($table);
try {
$values = $this->_fetchAll($select, $attributes);
} catch (Exception $e) {
AO::printException($e, $select);
$this->printLogQuery(true, true, $select);
throw $e;
}
foreach ($values as $value) {
$this->_setItemAttributeValue($value);
}
}
return $this;
}
示例2: installFailure
public function installFailure($observer)
{
echo "<h2>There was a problem proceeding with Magento installation.</h2>";
echo "<p>Please contact developers with error messages on this page.</p>";
echo AO::printException($observer->getEvent()->getException());
}