Functions Documentation | |
Name | errBlock |
Syntax | (errBlock list exp1 ... expn expError) |
Argument List | list: A list of temporary variables. The first variable stores any error that happens exp1 ... expn: The expressions you want to run. expError: The expression you want to run if an error occurs. |
Returns | The result of the last expression |
Category | control structure, error |
Description | Allows you to run expressios one right after the other. If there is an error the error is stored in the error variable and then runs the last function. If no errors the last function isn't run. |
Example |
(errblock (errVar) (dbgOutput "Running normally") (divide 10 0) (dbgOutput "Not running normally") (dbgOutput "The error is " errVar) )Displays Running normally The error is Division by zero (10 0) ### (divide 10 0) ### True |
Comment | Like iserror not as useful as it could be due to many errors hard crash the game and you can't throw your own errors. |
Mod of the Month (September '24) |
Featured Mods (random) |
Lego ship yellowjacket |
ODM Civilian Crafts |
Quality Mods (random) |
"PDmod" ICX Overhaul |
Gravity |
Balanced Mods (random) |
Captain's Log 3.1 |
Osaka Class Transport [In honor of Frontier 0.5] 1.1e |