diff options
Diffstat (limited to 'vendor/maennchen/zipstream-php/src/Exception/ResourceActionException.php')
-rw-r--r-- | vendor/maennchen/zipstream-php/src/Exception/ResourceActionException.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vendor/maennchen/zipstream-php/src/Exception/ResourceActionException.php b/vendor/maennchen/zipstream-php/src/Exception/ResourceActionException.php new file mode 100644 index 000000000..cbd9b0bb9 --- /dev/null +++ b/vendor/maennchen/zipstream-php/src/Exception/ResourceActionException.php @@ -0,0 +1,29 @@ +<?php + +declare(strict_types=1); + +namespace ZipStream\Exception; + +use ZipStream\Exception; + +/** + * This Exception gets invoked if a resource like `fread` returns false + */ +class ResourceActionException extends Exception +{ + /** + * @var ?resource + */ + public $resource; + + /** + * @param resource $resource + */ + public function __construct( + public readonly string $function, + $resource = null, + ) { + $this->resource = $resource; + parent::__construct('Function ' . $function . 'failed on resource.'); + } +} |