public function __construct($code, $message, $type, $trace = NULL)
 {
     ErrorPoint::$isNeedToLog = true;
     $this->code = $code;
     $this->message = $message;
     $this->type = $type;
     if ($this->type == ErrorPoint::TYPE_USER) {
         trigger_error($this->message, E_USER_NOTICE);
     } else {
         error_log(getErrorString($this->message));
     }
 }
function handlerError($errno, $errstr = NULL, $errfile = NULL, $errline = NULL)
{
    $errstr = getErrorString($errstr);
    switch ($errno) {
        case E_USER_ERROR:
        case E_USER_WARNING:
        case E_USER_NOTICE:
            fwrite(getLog(LOG_USER_ERROR), $errstr);
            break;
        default:
            fwrite(getLog(LOG_SYSTEM_ERROR), $errstr);
            break;
    }
    // exit();
}
Example #3
0
function netregistry_DeleteNameserver($params)
{
    $username = $params['Username'];
    $password = $params['Password'];
    $proxyHost = $params['ProxyHost'];
    $proxyPort = $params['ProxyPort'];
    $tld = $params['tld'];
    $sld = $params['sld'];
    $nameserver = $params['nameserver'];
    $values = array();
    try {
        $client = getSOAPClient($username, $password, $proxyHost, $proxyPort);
        $result = $client->deleteHost(array("domain" => "" . $sld . "." . $tld, "hostName" => $nameserver));
        if (hasErrors($result)) {
            logError(getErrorString($result));
            $values['error'] = getErrorString($result);
        }
    } catch (SoapFault $fault) {
        logError($fault);
        $values->error .= $fault;
    }
    return $values;
}