Aller au contenu
Lazer

Interrompre le code LUA d'un QuickApp

Recommended Posts

Savez vous s'il est possible d'interrompre brutalement le déroulement du code LUA d'un QuickApp ?
 

Sur HC2 on avait la commande fibaro:abort() qui faisait cela, je me demande s'il existe l'équivalent sur HC3 ?

 

J'ai bien comme idée de provoquer un crash du QuickApp en appelant une fonction non définie, mais ce n'est pas vraiment propre...

 

Note : l'utilisation de l'instruction return n'est pas adaptée à mon cas de figure car il y a plein de fonctions imbriquées les unes dans les autres

Partager ce message


Lien à poster
Partager sur d’autres sites
il y a 15 minutes, Lazer a dit :

Do you know if it is possible to abruptly interrupt the flow of the LUA code of a QuickApp?
 

On HC2 we had the fibaro command : abort () which did that, I wonder if there is the equivalent on HC3?

 

My idea is to cause the QuickApp to crash by calling an undefined function, but it's not really clean ...

 

Note: the use of the return statement is not suited to my situation because there are a lot of functions nested within each other

 plugin.restart() 
  • Like 4

Partager ce message


Lien à poster
Partager sur d’autres sites

Thank you, this is exactly what I was looking for :)

 

I cas see this command actually stops the code, but it doesn't restart the Quickapp, despite what its name would suggests.

 

EDIT : Sorry, it's OK, the QuickApp actually restarts

 

Modifié par Lazer

Partager ce message


Lien à poster
Partager sur d’autres sites

×