Commit 3b8f995b authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Exception quand le webservice retourne ok mais pas le matricule RH.

parent cac79e92
Loading
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -891,9 +891,18 @@ class Siham
            $exception = new SihamException($messageErreur, 0);
            $this->sendDebug('WS PECWebService / METHOD PriseEnChargeAgent', $exception);
            throw $exception;
        } elseif ($result->return->statut == 'MAJ OK' && !empty($result->return->matricule)) {
        } elseif ($result->return->statut == 'MAJ OK') {
            if(!empty($result->return->matricule))
            {
                return $result->return->matricule;
        } else {
            }
            else{
                $exception = new SihamException('Matricule de l\'agent non généré lors de la prise en charge', 0);
                $this->sendDebug('WS PECWebService / METHOD PriseEnChargeAgent', $exception);
                throw $exception;
            }
        }
        else {
            $exception = new SihamException('Erreur non identifié, veuillez vous rapprocher du support informatique', 0);
            $this->sendDebug('WS PECWebService / METHOD PriseEnChargeAgent', $exception);
            throw $exception;