# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
exit handler
# Params
- handler : The name of the handler in which the exit control structure appears.
# Examples
if the seconds > timeLimit then exit mouseUp
setProp myCustomProperty pValue -- can be used in getProp or setProp handlers exit myCustomProperty end myCustomProperty
# Description
Use the exit control structure to skip the rest of a handler statements without return a result.
You can use an exit control structure in a message handler, function handler, getProp handler, or setProp handler. Usually, exit is used within an if control structure, so that the handler stops if a condition is true and continues if the condition is false.
If the current handler was called from another handler, the calling handler continues executing. The exit statement only stops the current handler, not the caller. (To stop all pending handlers, use the exit to top control structure.)
When a handler executes an exit statement, the message, trigger, function call, or getProp call stops and is not pass to the next object in the message path. To halt the current handler and pass the message, trigger, or call on through the message path, use the pass control structure instead. To halt the current handler and return a result, use the return control structure instead.
>*Note:* The exit control structure is implemented internally as a > command and appears in the commandNames.
# Tags
# See
- **constant:** return - **command:** call - **function:** commandNames - **control structure:** getProp, return, setProp, if, pass, break, on, exit to top, exit repeat, function - **glossary:** object, function handler, return, message handler, setProp handler, pass, execute, function call, command, control structure, getProp handler, trigger, getProp call, caller, message path, message, statement, handler