| @@ 77-87 (lines=11) @@ | ||
| 74 | if ($errno === CURLE_OPERATION_TIMEOUTED) { |
|
| 75 | // Timeout |
|
| 76 | throw new TimeoutException(sprintf('Transport timeout after %.2f seconds wait', microtime(true) - $before)); |
|
| 77 | } elseif ($errno === CURLE_SSL_CACERT |
|
| 78 | || $errno === CURLE_SSL_CERTPROBLEM |
|
| 79 | || $errno === CURLE_SSL_CIPHER |
|
| 80 | || $errno === CURLE_SSL_CONNECT_ERROR |
|
| 81 | || $errno === CURLE_SSL_PEER_CERTIFICATE |
|
| 82 | || $errno === CURLE_SSL_ENGINE_NOTFOUND |
|
| 83 | || $errno === CURLE_SSL_ENGINE_SETFAILED |
|
| 84 | ) { |
|
| 85 | // SSL error |
|
| 86 | throw new IoException('Transport SSL error ' . $error, intval($errno)); |
|
| 87 | } elseif ($errno !== CURLE_OK) { |
|
| 88 | // Other error |
|
| 89 | throw new IoException('Curl error ' . $error, intval($errno)); |
|
| 90 | } |
|
| @@ 82-93 (lines=12) @@ | ||
| 79 | if ($errno === CURLE_OPERATION_TIMEOUTED) { |
|
| 80 | // Timeout |
|
| 81 | throw new TimeoutException(sprintf('Transport timeout after %.2f seconds wait', microtime(true) - $before)); |
|
| 82 | } elseif ($errno === CURLE_SSL_CACERT |
|
| 83 | || $errno === CURLE_SSL_CERTPROBLEM |
|
| 84 | || $errno === CURLE_SSL_CIPHER |
|
| 85 | || $errno === CURLE_SSL_CONNECT_ERROR |
|
| 86 | || $errno === CURLE_SSL_PEER_CERTIFICATE |
|
| 87 | || $errno === CURLE_SSL_ENGINE_NOTFOUND |
|
| 88 | || $errno === CURLE_SSL_ENGINE_SETFAILED |
|
| 89 | ) { |
|
| 90 | $this->curl = null; |
|
| 91 | // SSL error |
|
| 92 | throw new IoException('Transport SSL error ' . $error, intval($errno)); |
|
| 93 | } elseif ($errno !== CURLE_OK) { |
|
| 94 | $this->curl = null; |
|
| 95 | // Other error |
|
| 96 | throw new IoException('Curl error ' . $error, intval($errno)); |
|