Try/en: Porovnání verzí
(Založena nová stránka s textem „Try“) |
|||
| (Není zobrazeno 20 mezilehlých verzí od stejného uživatele.) | |||
| Řádek 3: | Řádek 3: | ||
[[Category:GuiMaster Library]] | [[Category:GuiMaster Library]] | ||
| − | == | + | == Description == |
'''Alias: TRY''' | '''Alias: TRY''' | ||
| − | ''' | + | '''Block for catching errors.''' |
| − | + | Runs a block of commands. 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. | |
| − | == | + | == Input parameters == |
<span id="retrycount-"></span> | <span id="retrycount-"></span> | ||
=== RetryCount === | === RetryCount === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Maximum number of tries to run the block. | |
=== Enabled === | === Enabled === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Enables or disables the command. If the value is 0, the command will not execute. | |
=== PreWait === | === PreWait === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Delay in milliseconds before executing the command. It has no effect if Enabled=0. | |
=== PostWait === | === PostWait === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Delay in milliseconds before executing the command. It has no effect if Enabled=0. | |
| − | == | + | == Output parameters == |
=== Error === | === Error === | ||
| − | + | Type [[Special:MyLanguage/Data types#Number | Number]] | |
| − | + | Code of the error that occurred in the try block or 0 if no error occurred. | |
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | |||
| − | Text | + | Text of the error that occurred in the try block. |
=== FailedCommand === | === FailedCommand === | ||
| − | + | Type [[Special:MyLanguage/Data types#String | String]] | |
| − | + | Name of the command in the try block that ended in error. | |
=== FailedCommandId === | === FailedCommandId === | ||
Aktuální verze z 1. 2. 2021, 19:06
Obsah
Description
Alias: TRY
Block for catching errors.
Runs a block of commands. 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.
Input parameters
RetryCount
Type Number
Maximum number of tries to run the block.
Enabled
Type Number
Enables or disables the command. If the value is 0, the command will not execute.
PreWait
Type Number
Delay in milliseconds before executing the command. It has no effect if Enabled=0.
PostWait
Type Number
Delay in milliseconds before executing the command. It has no effect if Enabled=0.
Output parameters
Error
Type Number
Code of the error that occurred in the try block or 0 if no error occurred.
Type String
Text of the error that occurred in the try block.
FailedCommand
Type String
Name of the command in the try block that ended in error.
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.