Skip to content
This repository
Browse code

Added StreamException

  • Loading branch information...
commit 802317e62cb89e40e16351352ef76776bb403328 1 parent f8638ec
Vasil Rangelov boenrobot authored
35 src/PEAR2/Net/Transmitter/StreamException.php
... ... @@ -0,0 +1,35 @@
  1 +<?php
  2 +
  3 +/**
  4 + * ~~summary~~
  5 + *
  6 + * ~~description~~
  7 + *
  8 + * PHP version 5
  9 + *
  10 + * @category Net
  11 + * @package PEAR2_Net_Transmitter
  12 + * @author Vasil Rangelov <boen.robot@gmail.com>
  13 + * @copyright 2011 Vasil Rangelov
  14 + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
  15 + * @version SVN: $WCREV$
  16 + * @link http://pear2.php.net/PEAR2_Net_Transmitter
  17 + */
  18 +/**
  19 + * The namespace declaration.
  20 + */
  21 +namespace PEAR2\Net\Transmitter;
  22 +
  23 +/**
  24 + * Exception thrown when something goes wrong with the connection.
  25 + *
  26 + * @category Net
  27 + * @package PEAR2_Net_Transmitter
  28 + * @author Vasil Rangelov <boen.robot@gmail.com>
  29 + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
  30 + * @link http://pear2.php.net/PEAR2_Net_Transmitter
  31 + */
  32 +class StreamException extends \RuntimeException implements Exception
  33 +{
  34 +
  35 +}
4 src/PEAR2/Net/Transmitter/StreamTransmitter.php
@@ -112,7 +112,7 @@ public function setTimeout($seconds, $microseconds = 0)
112 112 /**
113 113 * Sets the size of a stream's buffer.
114 114 *
115   - * @param int $size The desired size of the buffer, in bytes.
  115 + * @param int $size The desired size of the buffer, in bytes.
116 116 * @param string $direction The buffer of which direction to set. Valid
117 117 * values are the DIRECTION_* constants.
118 118 *
@@ -334,7 +334,7 @@ public function close()
334 334 */
335 335 protected function createException($message, $code = 0)
336 336 {
337   - return new \Exception($message, $code);
  337 + return new StreamException($message, $code);
338 338 }
339 339
340 340 }

0 comments on commit 802317e

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