X

Create New Item

File Folder

X

Search Results

File "ResourceActionException.php"

Full path: /home/andyrdhboardrevi/public_html/learn.andyrdhboardreview.com/vendor/maennchen/zipstream-php/src/Exception/ResourceActionException.php
File size: 563 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Edit   Back

<?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.');
    }
}