]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Remove exception so it never throwed by HTTPClient
authordarksider3 <leon@darksider3.de>
Mon, 3 Mar 2014 16:12:37 +0000 (16:12 +0000)
committerRoland Haeder <roland@mxchange.org>
Fri, 12 Sep 2014 20:18:04 +0000 (22:18 +0200)
lib/urlshortenerplugin2.php

index dc1701ccbd7870f5ce18f019b4d9c7ec8b75d721..cb11b12ec1fbc92b0aa9c2ef3a94446a9a96ad1d 100644 (file)
@@ -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");