コード例 #1
0
 /**
  * Deal with uncaught oxException exceptions.
  * IMPORTANT: uses _safeShopRedirectAndExit(), see description
  *
  * @param oxException $oEx Exception to handle
  *
  * @return null
  */
 protected function _uncaughtException(oxException $oEx)
 {
     // exception occured in function processing
     $oEx->setNotCaught();
     // general log entry for all exceptions here
     $oEx->debugOut();
     if (defined('OXID_PHP_UNIT')) {
         return $oEx->getString();
     } elseif (0 != $this->_iDebug) {
         oxUtils::getInstance()->showMessageAndExit($oEx->getString());
     }
     //simple safe redirect in productive mode
     $sShopUrl = oxConfig::getInstance()->getShopMainUrl();
     $this->_safeShopRedirectAndExit($sShopUrl . "offline.html");
     //should not be reached
     return;
 }
コード例 #2
0
 /**
  * Deal with uncaught oxException exceptions.
  *
  * @param oxException $oEx Exception to handle
  *
  * @return null
  */
 protected function _uncaughtException($oEx)
 {
     // exception occurred in function processing
     $oEx->setNotCaught();
     // general log entry for all exceptions here
     $oEx->debugOut();
     if (defined('OXID_PHP_UNIT')) {
         return $oEx->getString();
     } elseif (0 != $this->_iDebug) {
         oxRegistry::getUtils()->showMessageAndExit($oEx->getString());
     }
     try {
         oxRegistry::getUtils()->redirectOffline(500);
     } catch (Exception $oException) {
     }
     exit;
 }