|
|
|
@ -44,6 +44,9 @@ class LockedException extends \Exception { |
|
|
|
|
*/ |
|
|
|
|
private $path; |
|
|
|
|
|
|
|
|
|
/** @var string|null */ |
|
|
|
|
private $existingLock; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* LockedException constructor. |
|
|
|
|
* |
|
|
|
@ -54,6 +57,7 @@ class LockedException extends \Exception { |
|
|
|
|
*/ |
|
|
|
|
public function __construct(string $path, \Exception $previous = null, string $existingLock = null) { |
|
|
|
|
$message = '"' . $path . '" is locked'; |
|
|
|
|
$this->existingLock = $existingLock; |
|
|
|
|
if ($existingLock) { |
|
|
|
|
$message .= ', existing lock on file: ' . $existingLock; |
|
|
|
|
} |
|
|
|
@ -68,4 +72,12 @@ class LockedException extends \Exception { |
|
|
|
|
public function getPath(): string { |
|
|
|
|
return $this->path; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @return string |
|
|
|
|
* @since 19.0.0 |
|
|
|
|
*/ |
|
|
|
|
public function getExistingLock(): ?string { |
|
|
|
|
return $this->existingLock; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|