summaryrefslogtreecommitdiffstats
path: root/lib/public/lock/lockedexception.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/lock/lockedexception.php')
-rw-r--r--lib/public/lock/lockedexception.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/public/lock/lockedexception.php b/lib/public/lock/lockedexception.php
index f8a0221f10b..d6cec4cc48a 100644
--- a/lib/public/lock/lockedexception.php
+++ b/lib/public/lock/lockedexception.php
@@ -28,7 +28,10 @@ namespace OCP\Lock;
* @since 8.1.0
*/
class LockedException extends \Exception {
+
/**
+ * Locked path
+ *
* @var string
*/
private $path;
@@ -36,11 +39,13 @@ class LockedException extends \Exception {
/**
* LockedException constructor.
*
- * @param string $path
+ * @param string $path locked path
+ * @param \Exception $previous previous exception for cascading
+ *
* @since 8.1.0
*/
- public function __construct($path) {
- parent::__construct($path . ' is locked');
+ public function __construct($path, \Exception $previous = null) {
+ parent::__construct('"' . $path . '" is locked', 0, $previous);
$this->path = $path;
}