IOException.php 956 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Filesystem\Exception;
  11. /**
  12. * Exception class thrown when a filesystem operation failure happens.
  13. *
  14. * @author Romain Neutron <imprec@gmail.com>
  15. * @author Christian Gärtner <christiangaertner.film@googlemail.com>
  16. * @author Fabien Potencier <fabien@symfony.com>
  17. */
  18. class IOException extends \RuntimeException implements IOExceptionInterface
  19. {
  20. private $path;
  21. public function __construct(string $message, int $code = 0, \Throwable $previous = null, string $path = null)
  22. {
  23. $this->path = $path;
  24. parent::__construct($message, $code, $previous);
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function getPath()
  30. {
  31. return $this->path;
  32. }
  33. }