Optimisation Gestion d'erreur

This commit is contained in:
Claire DELBOS 2017-03-01 10:05:52 +01:00
parent 61a3878b5b
commit 1a538ed012

View File

@ -56,7 +56,7 @@ class Achatclient_IndexController extends Zend_Controller_Action
try { try {
$infocredit = $ws->infoCredit(); $infocredit = $ws->infoCredit();
} catch(Exception $e) { } catch(Exception $e) {
echo $e->getMessage(); $this->error('index','Pas de crédit');
} }
if ($infocredit === false || empty($infocredit)) { if ($infocredit === false || empty($infocredit)) {
$this->error('index','Compte indisponible'); $this->error('index','Compte indisponible');