diff options
author | Robin Appelman <robin@icewind.nl> | 2018-05-04 13:30:18 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-05-04 13:30:18 +0200 |
commit | 25565dd7d808dd33cc523525209ff5cfd5b9b6cd (patch) | |
tree | b94a6f516fbdb342bd4477b9f68b08bccb1dc692 /lib/public | |
parent | c8cb42fd2671c8b6ed3257e62fa9f6a24474acb8 (diff) | |
download | nextcloud-server-25565dd7d808dd33cc523525209ff5cfd5b9b6cd.tar.gz nextcloud-server-25565dd7d808dd33cc523525209ff5cfd5b9b6cd.zip |
Log more info about locking conflicts for memcache locking backends
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Lock/LockedException.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/public/Lock/LockedException.php b/lib/public/Lock/LockedException.php index 1378f437c3a..b4038f8dd55 100644 --- a/lib/public/Lock/LockedException.php +++ b/lib/public/Lock/LockedException.php @@ -46,11 +46,15 @@ class LockedException extends \Exception { * * @param string $path locked path * @param \Exception|null $previous previous exception for cascading - * + * @param string $existingLock since 14.0.0 * @since 8.1.0 */ - public function __construct(string $path, \Exception $previous = null) { - parent::__construct('"' . $path . '" is locked', 0, $previous); + public function __construct(string $path, \Exception $previous = null, string $existingLock = null) { + $message = '"' . $path . '" is locked'; + if ($existingLock) { + $message .= ', existing lock on file: ' . $existingLock; + } + parent::__construct($message, 0, $previous); $this->path = $path; } |