mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Pass path and error code to exceptions
This commit is contained in:
parent
cd5261a86d
commit
77c30c698f
4 changed files with 80 additions and 50 deletions
|
|
@ -7,4 +7,25 @@
|
|||
|
||||
namespace Icewind\SMB\Exception;
|
||||
|
||||
class InvalidRequestException extends Exception {}
|
||||
class InvalidRequestException extends Exception {
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $path;
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param int $code
|
||||
*/
|
||||
public function __construct($path, $code = 0) {
|
||||
parent::__construct('Invalid request for ' . $path, $code);
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPath() {
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue