Hello
Tu peux faire un try catch et t’envoyer une notification … c’est ce que je fais personnellement …
public static function executeCommande($commandName,$scenario=NULL) {
self::log($scenario,"executeCommande | $commandName");
try {
$cmd=cmd::byString('#'.$commandName.'#');
return $cmd->execCmd();
} catch (Exception $e) {
self::manageError($scenario,$e);
}
}
public static function manageError($scenario=null,$e) {
self::log($scenario," * Erreur execution commande : " . $e->getMessage());
$message=self::getScenarioName($scenario) . ' - erreur : ' . $e->getMessage();
self::log($scenario,$message);
notificationFunction::sendJeedomConnectMessage($scenario,self::exceptionReceiver,'Notification','','Erreur scenario : ',$message);
throw $e;
}