[-] BO : improved error display on admincarriers #PSCFV-5660

This commit is contained in:
DamienMetzger
2012-11-27 12:01:27 +01:00
parent 545e37a57f
commit ded3b0cd5e
@@ -467,6 +467,7 @@ class AdminCarriersControllerCore extends AdminController
/* Object update */ /* Object update */
if (isset($id) && !empty($id)) if (isset($id) && !empty($id))
{ {
try {
if ($this->tabAccess['edit'] === '1') if ($this->tabAccess['edit'] === '1')
{ {
$current_carrier = new Carrier($id); $current_carrier = new Carrier($id);
@@ -504,6 +505,9 @@ class AdminCarriersControllerCore extends AdminController
} }
else else
$this->errors[] = Tools::displayError('You do not have permission to edit here.'); $this->errors[] = Tools::displayError('You do not have permission to edit here.');
} catch (PrestaShopException $e) {
$this->errors[] = $e->getMessage();
}
} }
/* Object creation */ /* Object creation */