diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-06-11 18:32:15 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-06-16 10:48:31 +0200 |
commit | 0e3a3dd5d7fd9d57a099f3720af20b6f9a22d63f (patch) | |
tree | 8d883b4ad6572a08abeda852d3e157fe153face7 /lib/public/lock | |
parent | b6165b68655fdf957d9b63ab982a5f8724fcc3de (diff) | |
download | nextcloud-server-0e3a3dd5d7fd9d57a099f3720af20b6f9a22d63f.tar.gz nextcloud-server-0e3a3dd5d7fd9d57a099f3720af20b6f9a22d63f.zip |
Rethrow LockedException with full path
Because the path is converted to md5 from the original exception,
rethrow the exception with the correct full path
Diffstat (limited to 'lib/public/lock')
-rw-r--r-- | lib/public/lock/lockedexception.php | 11 |
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; } |