Esempio n. 1
0
 /**
  * Create a new ServiceException.
  *
  * @return array An array containing a collection of
  *          Zend_Gdata_GApps_Error objects.
  */
 public function __construct($errors = null)
 {
     parent::__construct("Server errors encountered");
     if ($errors !== null) {
         $this->setErrors($errors);
     }
 }
Esempio n. 2
0
    /**
     * @param \Zend\Ldap\Ldap $ldap A \Zend\Ldap\Ldap object
     * @param string    $str  An informtive exception message
     * @param int       $code An LDAP error code
     */
    public function __construct(LDAP $ldap = null, $str = null, $code = 0)
    {
        $errorMessages = array();
        $message = '';
        if ($ldap !== null) {
            $oldCode = $code;
            $message = $ldap->getLastError($code, $errorMessages) . ': ';
            if ($code === 0) {
                $message = '';
                $code = $oldCode;
            }
        }
        if (empty($message)) {
            if ($code > 0) {
                $message = '0x' . dechex($code) . ': ';
            }
        }

        if (!empty($str)) {
            $message .= $str;
        } else {
            $message .= 'no exception message';
        }

        parent::__construct($message, $code);
    }
Esempio n. 3
0
 public function __construct($message, $code = 0, $e = null, $op = null)
 {
     $this->operand = $op;
     parent::__construct($message, $code, $e);
 }
Esempio n. 4
0
 public function __construct($message, $fileerror = 0)
 {
     $this->_fileerror = $fileerror;
     parent::__construct($message);
 }