Better error management
This commit is contained in:
parent
e764f2137d
commit
dcd97bb1cf
@ -106,6 +106,7 @@ foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
}
|
||||
}
|
||||
}
|
||||
//var_dump($modulesdir);
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
@ -124,7 +125,9 @@ foreach ($modulesdir as $dir)
|
||||
|
||||
if ($modName)
|
||||
{
|
||||
include_once($dir.$file);
|
||||
try
|
||||
{
|
||||
$res=include_once($dir.$file);
|
||||
$objMod = new $modName($db);
|
||||
|
||||
if ($objMod->numero > 0)
|
||||
@ -157,6 +160,11 @@ foreach ($modulesdir as $dir)
|
||||
}
|
||||
else dol_syslog("Module ".get_class($objMod)." not qualified");
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user