<?php
// Copyright (c) Pickware GmbH. All rights reserved.
// This file is part of software that is released under a proprietary license.
// You must not copy, modify, distribute, make publicly available, or execute
// its contents or parts thereof without express permission by the copyright
// holder, unless otherwise permitted by law.

namespace Shopware\Plugins\ViisonCommon\Classes\Exceptions\FileSystemExceptions;

class FileNotStreamableException extends AbstractFileSystemException
{
    /**
     * @param string $path Path to file
     * @param \Exception|null $previousException
     */
    public function __construct($path, \Exception $previousException = null)
    {
        parent::__construct(
            sprintf(
                'File \'%s\' is not streamable. Please check if the file is readable and the target stream is writable. %s',
                $path,
                $previousException ? $previousException->getMessage() : ''
            ),
            $path,
            $previousException
        );
        $this->setSnippetName('fileNotStreamable');
    }
}
