[-] BO : catch prestashop exception and display smart error messages #PSCFV-9147

This commit is contained in:
Damien Metzger
2013-05-15 15:39:58 +02:00
parent e1afce7f22
commit e27ef3e7f2
+6
View File
@@ -513,6 +513,7 @@ class AdminControllerCore extends Controller
*/ */
public function postProcess() public function postProcess()
{ {
try {
if ($this->ajax) if ($this->ajax)
{ {
// from ajax-tab.php // from ajax-tab.php
@@ -544,6 +545,10 @@ class AdminControllerCore extends Controller
return $return; return $return;
} }
} }
} catch (PrestaShopException $e) {
$this->errors[] = $e->getMessage();
};
return false;
} }
/** /**
@@ -1161,6 +1166,7 @@ class AdminControllerCore extends Controller
header('Location: '.$this->redirect_after); header('Location: '.$this->redirect_after);
exit; exit;
} }
public function display() public function display()
{ {
$this->context->smarty->assign(array( $this->context->smarty->assign(array(