Skip to content

Commit

Permalink
Adds exception thrown by execute() method
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
toby-griffiths authored and greg0ire committed Oct 20, 2020
1 parent b85809c commit de9ce76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Doctrine/DBAL/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
Expand Down Expand Up @@ -200,6 +201,8 @@ public function getState()
* Executes this query using the bound parameters and their types.
*
* @return ResultStatement|int
*
* @throws Exception
*/
public function execute()
{
Expand Down

0 comments on commit de9ce76

Please sign in to comment.