src/Web/Communicator.php
protected function raiseCurlError($ch, $function)
    {
        $env = $this->config->getEnvironment();
        $message = sprintf('%s (curl: %s): ', $function, $env['curlVersion']);
        if ($ch) {
            $code = curl_errno($ch);
            $message .= sprintf('%d - %s', $code, curl_error($ch));
        } else {
            $code = 703;
            $message .= 'no curl handle';
        }
        curl_close($ch);
        throw new RuntimeException($message, $code);
    }
protected function raiseCurlError($ch, $function)
    {
        $env = $this->config->getEnvironment();
        $message = sprintf('%s (curl: %s): ', $function, $env['curlVersion']);
        if ($ch) {
            $code = curl_errno($ch);
            $message .= sprintf('%d - %s', $code, curl_error($ch));
        } else {
            $code = 703;
            $message .= 'no curl handle';
        }
        curl_close($ch);
        throw new RuntimeException($message, $code);
    }
protected function raiseCurlError ( $ ch , $ function ) { $ env = $ this -> config -> getEnvironment ( ) ; $ message = sprintf ( '%s (curl: %s): ' , $ function , $ env [ 'curlVersion' ] ) ; if ( $ ch ) { $ code = curl_errno ( $ ch ) ; $ message .= sprintf ( '%d - %s' , $ code , curl_error ( $ ch ) ) ; } else { $ code = 703 ; $ message .= 'no curl handle' ; } curl_close ( $ ch ) ; throw new RuntimeException ( $ message , $ code ) ; }
Adds a curl error message to the result.

@param resource|bool $ch
@param string $function
Adds a curl error message to the result .