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