From 5fdd7329df946c2d847175a68e57d5ab08ed5ebb Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Wed, 21 Sep 2016 00:34:19 +0200 Subject: [PATCH] Don't include the full stacktrace of the original exception in the message of the CurlException. --- XML/RPC2/Util/HTTPRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XML/RPC2/Util/HTTPRequest.php b/XML/RPC2/Util/HTTPRequest.php index 2a26060..b102d62 100644 --- a/XML/RPC2/Util/HTTPRequest.php +++ b/XML/RPC2/Util/HTTPRequest.php @@ -235,7 +235,7 @@ public function sendRequest() if ($result->getStatus() != 200) throw new XML_RPC2_ReceivedInvalidStatusCodeException('Received non-200 HTTP Code: ' . $result->getStatus() . '. Response body:' . $result->getBody()); } catch (HTTP_Request2_Exception $e) { - throw new XML_RPC2_CurlException($e); + throw new XML_RPC2_CurlException($e->getMessage(), 0, $e); } $this->_body = $result->getBody(); return $result->getBody();