From 70b42e4521ec023b0bd43133bd2eabd5f5f5030a Mon Sep 17 00:00:00 2001 From: darksider3 Date: Mon, 3 Mar 2014 16:12:37 +0000 Subject: [PATCH] Remove exception so it never throwed by HTTPClient --- lib/urlshortenerplugin2.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/urlshortenerplugin2.php b/lib/urlshortenerplugin2.php index dc1701ccbd..cb11b12ec1 100644 --- a/lib/urlshortenerplugin2.php +++ b/lib/urlshortenerplugin2.php @@ -140,19 +140,12 @@ abstract class UrlShortenerPlugin2 * * @return string response body * - * @todo self with exceptions as in httpGet() */ protected function httpPost($url, $data) { - try{ - $request = HTTPClient::start(); - $response = $request->post($url, null, $data); - - } catch(PluginErrorException $e) - { - $e->printFull(); - return false; - } + + $request = HTTPClient::start(); + $response = $request->post($url, null, $data); return $response->getBody(); } // Hook handlers @@ -207,7 +200,6 @@ abstract class UrlShortenerPlugin2 { $shortenedUrl = $result; //dont create an exception, so we can do that without. - //If needed, i can code done..but actually it seems useless to do that. common_log(LOG_INFO, __CLASS__ . ": $this->shortenerName ". "shortened $url to $shortenedUrl"); -- 2.39.5