Skip to content

Commit de9ce76

Browse files
toby-griffithsgreg0ire
authored andcommitted
Adds exception thrown by execute() method
My IDE was telling me I was trying to catch a non-existent exception, however it's clear by digging down a level that the Exception is throw by this class, so this simply annotates that. Perhaps this should catch it and throw a QueryException?
1 parent b85809c commit de9ce76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Doctrine/DBAL/Query/QueryBuilder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Doctrine\DBAL\Connection;
66
use Doctrine\DBAL\Driver\ResultStatement;
7+
use Doctrine\DBAL\Exception;
78
use Doctrine\DBAL\ParameterType;
89
use Doctrine\DBAL\Query\Expression\CompositeExpression;
910
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
@@ -200,6 +201,8 @@ public function getState()
200201
* Executes this query using the bound parameters and their types.
201202
*
202203
* @return ResultStatement|int
204+
*
205+
* @throws Exception
203206
*/
204207
public function execute()
205208
{

0 commit comments

Comments
 (0)