smb/src/Exception/InvalidRequestException.php
Joas Schilling 8a6c8cd17c
feat: Add PHP 8.4 support
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-11-08 12:06:31 +01:00

29 lines
643 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2014 Robin Appelman <robin@icewind.nl>
* SPDX-License-Identifier: MIT
*/
namespace Icewind\SMB\Exception;
class InvalidRequestException extends Exception {
/**
* @var string
*/
protected $path;
public function __construct(string $path = "", int $code = 0, ?\Throwable $previous = null) {
$class = get_class($this);
$parts = explode('\\', $class);
$baseName = array_pop($parts);
parent::__construct('Invalid request for ' . $path . ' (' . $baseName . ')', $code, $previous);
$this->path = $path;
}
/**
* @return string
*/
public function getPath() {
return $this->path;
}
}