Try/en: Porovnání verzí
(Založena nová stránka s textem „Runs a command block. If an error occurs, it sets the output parameters with information about the error, runs the commands in the catch section and, if ne…“) |
|||
| Řádek 7: | Řádek 7: | ||
'''Alias: TRY''' | '''Alias: TRY''' | ||
| − | '''Block | + | '''Block for catching errors.''' |
Runs a command block. If an error occurs, it sets the output parameters with information about the error, runs the commands in the catch section and, if necessary, depending on the value of [[#retrycount-|RetryCount]], it will try to run the block repeatedly. Finally, it runs the command block in the finally section. | Runs a command block. If an error occurs, it sets the output parameters with information about the error, runs the commands in the catch section and, if necessary, depending on the value of [[#retrycount-|RetryCount]], it will try to run the block repeatedly. Finally, it runs the command block in the finally section. | ||
Verze z 1. 2. 2021, 19:01
Obsah
Description
Alias: TRY
Block for catching errors.
Runs a command block. If an error occurs, it sets the output parameters with information about the error, runs the commands in the catch section and, if necessary, depending on the value of RetryCount, it will try to run the block repeatedly. Finally, it runs the command block in the finally section.
Vstupní parametry
RetryCount
Typ Number
Maximální počet pokusů o znovuspuštění bloku try.
Enabled
Typ Number
Povoluje nebo zakazuje příkaz. Při hodnotě 0 nebude příkaz proveden.
PreWait
Typ Number
Prodleva v milisekundách před provedením příkazu. Nemá žádný vliv je-li Enabled=0.
PostWait
Typ Number
Prodleva v milisekundách po provedení příkazu. Nemá žádný vliv je-li Enabled=0.
Výstupní parametry
Error
Typ Number
Kód chyby, která se vyskytla v bloku try nebo 0, pokud k chybě nedošlo.
ErrorMessage
Typ String
Text chyby, která se vyskytla v bloku try.
FailedCommand
Typ String
Název příkazu z bloku try, který skončil chybou.
FailedCommandId
Typ String
Identifikátor příkazu z bloku try, který skončil chybou.
SourceError
Typ Number
Kód původní chyby, která se vyskytla během vykonávání bloku try nebo 0, pokud k žádné chybě nedošlo.
SourceErrorMessage
Typ String
Text původní chyby, která se vyskytla během vykonávání bloku try.
FailedSourceCommand
Typ String
Název příkazu, který chybu vyvolal.
FailedSourceCommandId
Typ String
Identifikátor příkazu, který chybu vyvolal.