diff --git a/lib/private/lock/dblockingprovider.php b/lib/private/lock/dblockingprovider.php
index 1e93a6cec6ceb2695f30d776ad8c0e0a72260e88..450a0a27ab07f612ae84a7383e1aacb5e1d0e40f 100644
--- a/lib/private/lock/dblockingprovider.php
+++ b/lib/private/lock/dblockingprovider.php
@@ -187,7 +187,7 @@ class DBLockingProvider extends AbstractLockingProvider {
 	public function __destruct() {
 		try {
 			$this->cleanEmptyLocks();
-		} catch (\PDOException $e) {
+		} catch (\Exception $e) {
 			// If the table is missing, the clean up was successful
 			if ($this->connection->tableExists('file_locks')) {
 				throw $e;