modification gestion des exceptions
Some checks failed
Cadoles/hydra-sql/pipeline/pr-develop There was a failure building this commit
Some checks failed
Cadoles/hydra-sql/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
@ -2,9 +2,7 @@
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use App\SQLLogin\Exception\DataToFetchConfigurationException;
|
||||
use App\SQLLogin\Exception\EmptyResultException;
|
||||
use App\SQLLogin\Exception\NullDataToFetchException;
|
||||
use App\SQLLogin\SQLLoginConnect;
|
||||
use App\SQLLogin\SQLLoginRequest;
|
||||
use PDO;
|
||||
@ -25,12 +23,8 @@ class SQLLoginService extends AbstractController
|
||||
|
||||
public function fetchPasswordAndDatas(string $login): array
|
||||
{
|
||||
try {
|
||||
$dataRequest = $this->sqlLoginRequest->getDatasRequest();
|
||||
$datas = $this->executeRequestWithLogin($dataRequest, $login);
|
||||
} catch (NullDataToFetchException $e) {
|
||||
throw new DataToFetchConfigurationException($e->getMessage());
|
||||
}
|
||||
$dataRequest = $this->sqlLoginRequest->getDatasRequest();
|
||||
$datas = $this->executeRequestWithLogin($dataRequest, $login);
|
||||
|
||||
return $datas;
|
||||
}
|
||||
|
Reference in New Issue
Block a user