From 397b36416142fb856ef4819df4cf433c3bcd0f1b Mon Sep 17 00:00:00 2001 From: Christian Klauenbosch Date: Mon, 10 Jul 2017 18:10:28 +0200 Subject: [PATCH] changed thrown exception in model --- .../Common/RowMapperBundle/Services/Model/Model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChrisAndChris/Common/RowMapperBundle/Services/Model/Model.php b/src/ChrisAndChris/Common/RowMapperBundle/Services/Model/Model.php index aa320c9..02a52b0 100644 --- a/src/ChrisAndChris/Common/RowMapperBundle/Services/Model/Model.php +++ b/src/ChrisAndChris/Common/RowMapperBundle/Services/Model/Model.php @@ -3,6 +3,7 @@ use ChrisAndChris\Common\RowMapperBundle\Entity\Entity; use ChrisAndChris\Common\RowMapperBundle\Entity\KeyValueEntity; +use ChrisAndChris\Common\RowMapperBundle\Exceptions\Database\NoSuchRowFoundException; use ChrisAndChris\Common\RowMapperBundle\Exceptions\DatabaseException; use ChrisAndChris\Common\RowMapperBundle\Exceptions\ForeignKeyConstraintException; use ChrisAndChris\Common\RowMapperBundle\Exceptions\InvalidOptionException; @@ -240,7 +241,7 @@ private function handleGeneric(PdoStatement $statement, \Closure $mappingCallbac if (!empty($statement->getRequiresResultErrorMessage())) { $error = $statement->getRequiresResultErrorMessage(); } - throw new NotFoundHttpException($error); + throw new NoSuchRowFoundException($error); } return $mappingCallback($statement);