PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / trunk
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution vtrunk
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / Performance / Filesystem / Exceptions / IOException.php

IOException.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution trunk, at src/Performance/Filesystem/Exceptions/IOException.php

50 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Exception thrown when a filesystem operation fails.
4 *
5 * @package SolidWP\Performance
6 */
7
8 declare( strict_types=1 );
9
10 namespace SolidWP\Performance\Filesystem\Exceptions;
11
12 use RuntimeException;
13 use Throwable;
14
15 /**
16 * Exception thrown when a filesystem operation fails.
17 *
18 * @package SolidWP\Performance
19 */
20 final class IOException extends RuntimeException {
21
22 /**
23 * The file path.
24 *
25 * @var string|null
26 */
27 private ?string $path;
28
29 /**
30 * @param string $message The exception message.
31 * @param int $code The error code.
32 * @param Throwable|null $previous The previous exception interface.
33 * @param string|null $path The file path.
34 */
35 public function __construct( string $message, int $code = 0, ?Throwable $previous = null, ?string $path = null ) {
36 $this->path = $path;
37
38 parent::__construct( $message, $code, $previous );
39 }
40
41 /**
42 * Get the file path associated with exception.
43 *
44 * @return string|null
45 */
46 public function get_path(): ?string {
47 return $this->path;
48 }
49 }
50