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);