diff --git a/Core/src/Lock/SymfonyLockAdapter.php b/Core/src/Lock/SymfonyLockAdapter.php index 7736b8bb9a2d..84972ee1b1b5 100644 --- a/Core/src/Lock/SymfonyLockAdapter.php +++ b/Core/src/Lock/SymfonyLockAdapter.php @@ -60,7 +60,14 @@ public function acquire(array $options = []) try { return $this->lock->acquire($options['blocking']); } catch (\Exception $ex) { - throw new \RuntimeException($ex->getMessage()); + throw new \RuntimeException( + sprintf( + 'Acquiring the lock failed with the following message: %s', + $ex->getMessage() + ), + 0, + $ex + ); } } @@ -74,7 +81,14 @@ public function release() try { $this->lock->release(); } catch (\Exception $ex) { - throw new \RuntimeException($ex->getMessage()); + throw new \RuntimeException( + sprintf( + 'Releasing the lock failed with the following message: %s', + $ex->getMessage() + ), + 0, + $ex + ); } } }