Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added StreamException

  • Loading branch information...
commit 802317e62cb89e40e16351352ef76776bb403328 1 parent f8638ec
@boenrobot boenrobot authored
View
35 src/PEAR2/Net/Transmitter/StreamException.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * ~~summary~~
+ *
+ * ~~description~~
+ *
+ * PHP version 5
+ *
+ * @category Net
+ * @package PEAR2_Net_Transmitter
+ * @author Vasil Rangelov <boen.robot@gmail.com>
+ * @copyright 2011 Vasil Rangelov
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version SVN: $WCREV$
+ * @link http://pear2.php.net/PEAR2_Net_Transmitter
+ */
+/**
+ * The namespace declaration.
+ */
+namespace PEAR2\Net\Transmitter;
+
+/**
+ * Exception thrown when something goes wrong with the connection.
+ *
+ * @category Net
+ * @package PEAR2_Net_Transmitter
+ * @author Vasil Rangelov <boen.robot@gmail.com>
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @link http://pear2.php.net/PEAR2_Net_Transmitter
+ */
+class StreamException extends \RuntimeException implements Exception
+{
+
+}
View
4 src/PEAR2/Net/Transmitter/StreamTransmitter.php
@@ -112,7 +112,7 @@ public function setTimeout($seconds, $microseconds = 0)
/**
* Sets the size of a stream's buffer.
*
- * @param int $size The desired size of the buffer, in bytes.
+ * @param int $size The desired size of the buffer, in bytes.
* @param string $direction The buffer of which direction to set. Valid
* values are the DIRECTION_* constants.
*
@@ -334,7 +334,7 @@ public function close()
*/
protected function createException($message, $code = 0)
{
- return new \Exception($message, $code);
+ return new StreamException($message, $code);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.