protected function checkForCurlErrors()
    {
        if (curl_errno($this->getHandle())) {
            $exceptionText = "Connection Error: " . curl_error($this->getHandle());
            throw new ConnectionException($exceptionText);
        }
    }