Difference between revisions of "catch"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
 
m (Text replacement - "\[\[Category:ArmA: Control Structures\|[a-zA-Z0-9 _]*\]\]" to "")
 
(25 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|CATCH]]
+
{{Command|Comments=
[[Category:Scripting Commands ArmA|CATCH]]
+
____________________________________________________________________________________________
 +
 
 +
| arma |Game name=
 +
 
 +
|1.00|Game version=
 +
____________________________________________________________________________________________
  
 +
| Processes code when an [[Exception handling|exception]] is thrown in a [[try]] block. The exception caught can be found in the ''_exception'' variable. |DESCRIPTION=
 +
____________________________________________________________________________________________
  
<h2 style="color:#000066">'''''try-block'' catch ''filename'''''</h2>
+
| try-block '''catch''' code |SYNTAX=
  
 +
|p1= try-Block: [[Exception handling|Exception Type]] |PARAMETER1=
  
'''Operand types:'''
+
|p2= code: [[Code]] |PARAMETER2=
  
'''try-Block''':
+
| [[Anything]] |RETURNVALUE=
 +
____________________________________________________________________________________________
  
'''code''': [[Code]]
+
| [[Exception handling]], [[try]], [[throw]] |SEEALSO=
  
'''Type of returned value:'''
+
}}
  
[[Anything]]
+
<h3 style="display:none">Notes</h3>
 +
<dl class="command_description">
 +
<!-- Note Section BEGIN -->
  
'''Compatibility:'''
+
<!-- Note Section END -->
 +
</dl>
  
2.x
+
<h3 style="display:none">Bottom Section</h3>
  
'''Description:'''
+
[[Category:Scripting Commands|CATCH]]
 +
[[Category:Scripting Commands ArmA|CATCH]]
 +
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
  
Processes code, when exception is thrown in try block.
+
[[Category:Command Group: Program Flow|CATCH]]

Latest revision as of 21:44, 19 September 2019

Introduced with Armed Assault version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Armed Assault
Version:
1.00

Description

Description:
Processes code when an exception is thrown in a try block. The exception caught can be found in the _exception variable.

Syntax

Syntax:
try-block catch code
Parameters:
try-Block: Exception Type
code: Code
Return Value:
Anything

Examples

Example 1:
Example needed

Additional Information

Multiplayer:
-
See also:
Exception handlingtrythrow

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section