From 6ecce2d4dd7144a54d60763619699701431abf98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Malling?= Date: Thu, 19 Nov 2020 12:00:28 +0100 Subject: [PATCH] BUGFIX: Use fullyqualified classname for exception (#19) * TASK: Use fullyqualified classname for exception * Fix FQN of caught DBAL exception Co-authored-by: bwaidelich --- Classes/Queue/DoctrineQueue.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Classes/Queue/DoctrineQueue.php b/Classes/Queue/DoctrineQueue.php index 5be6d54..2fa0dde 100644 --- a/Classes/Queue/DoctrineQueue.php +++ b/Classes/Queue/DoctrineQueue.php @@ -19,7 +19,6 @@ use Doctrine\DBAL\Exception\TableNotFoundException; use Flowpack\JobQueue\Common\Queue\Message; use Flowpack\JobQueue\Common\Queue\QueueInterface; -use Neos\Flow\Annotations as Flow; /** * A queue implementation using doctrine as the queue backend @@ -116,7 +115,7 @@ public function setUp(): void $this->connection->exec($createDatabaseStatement); try { $this->connection->exec("CREATE INDEX state_scheduled ON {$this->connection->quoteIdentifier($this->tableName)} (state, scheduled)"); - } catch (Exception $e) { + } catch (DBALException $e) { // See https://dba.stackexchange.com/questions/24531/mysql-create-index-if-not-exists } }