[-] BO : catch prestashop exception and display smart error messages #PSCFV-9147
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user