/** * Net_LDAP_Error constructor. * * @param mixed Net_LDAP error code, or string with error message. * @param integer what "error mode" to operate in * @param integer what error level to use for $mode & PEAR_ERROR_TRIGGER * @param mixed additional debug info, such as the last query * @access public * @see PEAR_Error */ function Net_LDAP_Error($code = NET_LDAP_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) { $mode = PEAR_ERROR_RETURN; if (is_int($code)) { $this->PEAR_Error('Net_LDAP_Error: ' . Net_LDAP::errorMessage($code), $code, $mode, $level, $debuginfo); } else { $this->PEAR_Error("Net_LDAP_Error: {$code}", NET_LDAP_ERROR, $mode, $level, $debuginfo); } }
/** * Net_LDAP_Error constructor. * * @param string $message String with error message. * @param integer $code Net_LDAP error code * @param integer $mode what "error mode" to operate in * @param mixed $level what error level to use for $mode & * PEAR_ERROR_TRIGGER * @param mixed $debuginfo additional debug info, such as the last query * * @access public * @see PEAR_Error */ function Net_LDAP_Error($message = 'Net_LDAP_Error', $code = NET_LDAP_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) { $error_code = NET_LDAP_ERROR; $msg = "{$message}: {$code}"; if (is_int($code)) { $msg = $message . ': ' . Net_LDAP::errorMessage($code); $error_code = $code; } $this->PEAR_Error($msg, $error_code, $mode, $level, $debuginfo); }