You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
588 B

  1. <?php
  2. namespace GuzzleHttp\Exception;
  3. use Psr\Http\Message\StreamInterface;
  4. /**
  5. * Exception thrown when a seek fails on a stream.
  6. */
  7. class SeekException extends \RuntimeException implements GuzzleException
  8. {
  9. private $stream;
  10. public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
  11. {
  12. $this->stream = $stream;
  13. $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
  14. parent::__construct($msg);
  15. }
  16. /**
  17. * @return StreamInterface
  18. */
  19. public function getStream()
  20. {
  21. return $this->stream;
  22. }
  23. }