PM-2939: I catch and show the error
This commit is contained in:
@@ -25,32 +25,44 @@ class actionsByEmailCoreClass extends PMPlugin
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
// Validations
|
// Validations
|
||||||
if (!is_object($data)) {
|
try {
|
||||||
throw new Exception('The parameter $data is null.');
|
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.');
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($data->TAS_UID)) {
|
if (!isset($data->APP_UID)) {
|
||||||
throw new Exception('The parameter $data->TAS_UID is null.');
|
throw new Exception('The parameter $data->APP_UID is null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($data->APP_UID)) {
|
if (!isset($data->DEL_INDEX)) {
|
||||||
throw new Exception('The parameter $data->APP_UID is null.');
|
throw new Exception('The parameter $data->DEL_INDEX is null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($data->DEL_INDEX)) {
|
if (!isset($data->USR_UID)) {
|
||||||
throw new Exception('The parameter $data->DEL_INDEX is null.');
|
throw new Exception('The parameter $data->USR_UID is null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($data->TAS_UID == '') {
|
if ($data->TAS_UID == '') {
|
||||||
throw new Exception('The parameter $data->TAS_UID is empty.');
|
throw new Exception('The parameter $data->TAS_UID is empty.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($data->APP_UID == '') {
|
if ($data->APP_UID == '') {
|
||||||
throw new Exception('The parameter $data->APP_UID is empty.');
|
throw new Exception('The parameter $data->APP_UID is empty.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($data->DEL_INDEX == '') {
|
if ($data->DEL_INDEX == '') {
|
||||||
throw new Exception('The parameter $data->DEL_INDEX is empty.');
|
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');
|
G::LoadClass('pmFunctions');
|
||||||
|
|||||||
Reference in New Issue
Block a user