Error management

This commit is contained in:
Laurent Destailleur 2018-03-13 12:54:53 +01:00
parent fd249c60da
commit 4380367923

View File

@ -205,9 +205,17 @@ function limitChars(textarea, limit, infodiv)
try try
{ {
$classname=ucfirst($classfile); $classname=ucfirst($classfile);
if (class_exists($classname))
{
$sms = new $classname($this->db); $sms = new $classname($this->db);
$resultsender = $sms->SmsSenderList(); $resultsender = $sms->SmsSenderList();
} }
else
{
$sms = new stdClass();
$sms->error='The SMS manager '.$classfile.' defined into SMS setup MAIN_SMS_SENDMODE is not found';
}
}
catch(Exception $e) catch(Exception $e)
{ {
dol_print_error('','Error to get list of senders: '.$e->getMessage()); dol_print_error('','Error to get list of senders: '.$e->getMessage());