GetVocal Voice Portal Technologies

[1.0 to 2.0][Tags][Attributes][Variables][Events][Properties]

VoiceXML Tag
<catch>

Catch an event.

Parent Tags
<field> <form> <initial> <menu> <object> <record> <subdialog> <transfer> <vxml>

Content Syntax
The value may be empty, or may contain one or more elements, where an element is either parsed text or one of the following tags.

<assign> <audio> <clear> <disconnect> <enumerate> <exit> <goto> <if> <log> <prompt> <reprompt> <return> <script> <submit> <throw> <value> <var>

Attributes
Name Req/opt Default Valid values
cond Optional Text
count Optional Text
event Required Text

Compatibility
VoiceXML 1.0 Yes, 2.0 Yes.

Description
Defines an event handler. The event to be caught is specified by the name attribute. The count and cond attributes can be used to control when a handler is considered eligible to catch an exception.

The event handler contains executable content, this content is executed when the handler catches an event.

When an event is thrown, the browser searches the current scope for event handlers in the order in which they are written in the page. The name of the event matches if the name handler matches the name attribute up to a period. Exactly one handler will catch a given event. So, if an event a.b.c is thrown, and the event handler name is a.b, the name matches. The first matching event handler in a given scope is executed, even if there is a closer match later in the same scope, so a handler for a.b will be executed even if there is a later handler for a.b.c.

If no eligible handler with a matching name is found in the current scope, the browser searches outwards for a scope with a matching handler.

©  GetVocal, inc. All Rights Reserved.