Skip to content
Browse files

Fixed usage of JException (now deprecated).

  • Loading branch information...
1 parent 5e33a19 commit e6adabf45c790b6f8cf05081f5afca9ca706faed @eddieajau committed Aug 15, 2011
Showing with 11 additions and 11 deletions.
  1. +11 −11 libraries/joomla/client/http.php
View
22 libraries/joomla/client/http.php
@@ -86,7 +86,7 @@ public function __destruct()
* @return boolean True on success.
*
* @since 11.1
- * @throws JException
+ * @throws Exception
*/
public function head($url)
{
@@ -97,7 +97,7 @@ public function head($url)
{
$connection = $this->connect($uri);
}
- catch (JException $e)
+ catch (Exception $e)
{
return false;
}
@@ -119,7 +119,7 @@ public function head($url)
* @return boolean True on success.
*
* @since 11.1
- * @throws JException
+ * @throws Exception
*/
public function get($url)
{
@@ -130,7 +130,7 @@ public function get($url)
{
$connection = $this->connect($uri);
}
- catch (JException $e)
+ catch (Exception $e)
{
return false;
}
@@ -153,7 +153,7 @@ public function get($url)
* @return boolean True on success.
*
* @since 11.1
- * @throws JException
+ * @throws Exception
*/
public function post($url, $data)
{
@@ -164,7 +164,7 @@ public function post($url, $data)
{
$connection = $this->connect($uri);
}
- catch (JException $e)
+ catch (Exception $e)
{
return false;
}
@@ -190,7 +190,7 @@ public function post($url, $data)
* @return boolean True on success.
*
* @since 11.1
- * @throws JException
+ * @throws Exception
*/
protected function sendRequest($connection, $method, JUri $uri, $data = null, $headers = null)
{
@@ -201,12 +201,12 @@ protected function sendRequest($connection, $method, JUri $uri, $data = null, $h
$meta = stream_get_meta_data($connection);
if ($meta['timed_out'])
{
- throw new Exception('Server connection timed out.', 0, E_WARNING);
+ throw new Exception('Server connection timed out.', 0);
}
}
else
{
- throw new Exception('Not connected to server.', 0, E_WARNING);
+ throw new Exception('Not connected to server.', 0);
}
// Get the request path from the URI object.
@@ -261,7 +261,7 @@ protected function sendRequest($connection, $method, JUri $uri, $data = null, $h
* @return JHttpResponse
*
* @since 11.1
- * @throws JException
+ * @throws Exception
*/
protected function getResponseObject()
{
@@ -284,7 +284,7 @@ protected function getResponseObject()
// No valid response code was detected.
else
{
- throw new Exception('Invalid server response.', 0, E_WARNING, $this->response);
+ throw new Exception('Invalid server response.', 0);
}
// Add the response headers to the response object.

0 comments on commit e6adabf

Please sign in to comment.
Something went wrong with that request. Please try again.