Author: dimitry
Date: 2005-06-04 00:31:48 +0400 (Sat, 04 Jun 2005)
New Revision: 424
Modified:
src/classes/Unit/NetQuery.class.php
Log:
won't suppress exceptions, want to know how it comes.
Modified: src/classes/Unit/NetQuery.class.php
===================================================================
--- src/classes/Unit/NetQuery.class.php 2005-06-02 23:26:46 UTC (rev 423)
+++ src/classes/Unit/NetQuery.class.php 2005-06-03 20:31:48 UTC (rev 424)
@@ -141,26 +141,19 @@
**/
private function get($query, $url, $cookie = '')
{
- try {
- $socket = $this->getSocket();
-
+ $socket = $this->getSocket();
- if ($query) {
- $out = "GET /$url?&$query HTTP/1.0$this->rn";
- } else {
- $out = "GET /$url HTTP/1.0$this->rn";
- }
- $out .= 'Host: ' . $this->host . $this->rn;
- $out .= "User-Agent: NetQuery$this->rn";
- $out .= $cookie;
- $out .= $this->rn;
-
- return $this->getQueryResult($socket, $out);
- } catch (NetworkException $ne) {
- throw $ne;
- } catch (Exception $e) {
- return $e->getMessage();
+ if ($query) {
+ $out = "GET /$url?&$query HTTP/1.0$this->rn";
+ } else {
+ $out = "GET /$url HTTP/1.0$this->rn";
}
+ $out .= 'Host: ' . $this->host . $this->rn;
+ $out .= "User-Agent: NetQuery$this->rn";
+ $out .= $cookie;
+ $out .= $this->rn;
+
+ return $this->getQueryResult($socket, $out);
}
/**
@@ -220,13 +213,9 @@
**/
private function getSocket()
{
- try {
- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
- socket_connect($socket, $this->host, $this->port);
- return $socket;
- } catch (Exception $e) {
- throw new NetworkException;
- }
+ $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
+ socket_connect($socket, $this->host, $this->port);
+ return $socket;
}
}
?>
\ No newline at end of file
Received on Sat Jun 04 2005 - 00:31:52 MSD
This archive was generated by hypermail 2.2.0 : Sat Oct 27 2007 - 19:25:49 MSD