diff options
author | David Flatz | 2018-08-03 17:28:41 +0200 |
---|---|---|
committer | David Flatz | 2018-08-03 17:33:01 +0200 |
commit | 852fbc84e78487394ba0ee5b1590ed29aaa730ef (patch) | |
tree | ac6190985afbbca703b29f93f3aef961c61e2e4d /it_url.class | |
parent | 09f1498ae0ee0109dd8f4a6023054d00457ea637 (diff) | |
download | itools-852fbc84e78487394ba0ee5b1590ed29aaa730ef.tar.gz itools-852fbc84e78487394ba0ee5b1590ed29aaa730ef.tar.bz2 itools-852fbc84e78487394ba0ee5b1590ed29aaa730ef.zip |
expose errno since some errors don't necessarily have an errorstring (e.g. when curl couldn't connect to a server because it couldn't assign the requested address because the pool of local ports is exhausted)
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index d3aa6df..ea93930 100644 --- a/it_url.class +++ b/it_url.class @@ -261,12 +261,12 @@ function request($p=array()) } } else { $result = $this->result = false; - $this->errstr = curl_error($curl); + $this->errstr = trim("(" . curl_errno($curl) . ") " . curl_error($curl)); $this->curlinfo = curl_getinfo($curl); } if ($got === false && $p['retries'] <= 0) - it::error((array)$p['it_error'] + ['title' => "problem getting $url->url with curl: " . curl_error($curl), 'body' => curl_getinfo($curl)]); + it::error((array)$p['it_error'] + ['title' => "problem getting $url->url with curl: (" . curl_errno($curl) . ") " . curl_error($curl), 'body' => curl_getinfo($curl)]); return $result; } |