コード例 #1
0
ファイル: lite.php プロジェクト: naao/myshop
 /**
  * Trigger a PEAR error
  *
  * To improve performances, the PEAR.php file is included dynamically.
  * The file is so included only when an error is triggered. So, in most
  * cases, the file isn't included and perfs are much better.
  *
  * @param string $msg error message
  * @param int $code error code
  * @access public
  */
 function raiseError($msg, $code)
 {
     include_once 'PEAR.php';
     return myshop_PEAR::raiseError($msg, $code, $this->_pearErrorMode);
 }
コード例 #2
0
ファイル: PEAR.php プロジェクト: naao/myshop
 /**
  * Simpler form of raiseError with fewer options.  In most cases
  * message, code and userinfo are enough.
  *
  * @param string $message
  *
  */
 function &throwError($message = null, $code = null, $userinfo = null)
 {
     if (isset($this) && is_a($this, 'PEAR')) {
         $a =& $this->raiseError($message, $code, null, null, $userinfo);
         return $a;
     } else {
         $a =& myshop_PEAR::raiseError($message, $code, null, null, $userinfo);
         return $a;
     }
 }