Commit 90d20457 authored by pounard's avatar pounard
Browse files

Switched catch statement from DatabaseException to DatabaseExceptionWrapper for better granularity

parent 1bcdb028
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Lock;
use Drupal\Core\Database\DatabaseException;
use Drupal\Core\Database\DatabaseExceptionWrapper;
* Defines the database lock backend. This is the default backend in Drupal.
......@@ -53,7 +53,7 @@ public function acquire($name, $timeout = 30.0) {
// We never need to try again.
$retry = FALSE;
catch (DatabaseException $e) {
catch (DatabaseExceptionWrapper $e) {
// Suppress the error. If this is our first pass through the loop,
// then $retry is FALSE. In this case, the insert must have failed
// meaning some other request acquired the lock but did not release it.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment