PM-2939: I catch and show the error

This commit is contained in:
Paula V. Quispe
2015-06-15 10:17:14 -04:00
parent 1f08900b71
commit 2a82e14fed

View File

@@ -25,10 +25,10 @@ class actionsByEmailCoreClass extends PMPlugin
{
try {
// Validations
try {
if (!is_object($data)) {
throw new Exception('The parameter $data is null.');
}
if (!isset($data->TAS_UID)) {
throw new Exception('The parameter $data->TAS_UID is null.');
}
@@ -41,6 +41,10 @@ class actionsByEmailCoreClass extends PMPlugin
throw new Exception('The parameter $data->DEL_INDEX is null.');
}
if (!isset($data->USR_UID)) {
throw new Exception('The parameter $data->USR_UID is null.');
}
if ($data->TAS_UID == '') {
throw new Exception('The parameter $data->TAS_UID is empty.');
}
@@ -53,6 +57,14 @@ class actionsByEmailCoreClass extends PMPlugin
throw new Exception('The parameter $data->DEL_INDEX is empty.');
}
if ($data->USR_UID == '') {
throw new Exception('The parameter $data->USR_UID is empty.');
}
} catch(Exception $e) {
echo $e->getMessage().' Please contact to your system administrator.';
die;
}
G::LoadClass('pmFunctions');
$emailSetup = getEmailConfiguration();