Throws a pre-defined event or application-specific event.
<throw
event="event"
eventexpr="ECMAScript_Expression"
message="string"
messageexpr="ECMAScript_Expression"/>
|
|
Attribute |
Description |
|
event |
The name of the event to be thrown. Exactly one of event or eventexpr must be specified. |
|
eventexpr |
An ECMAScript expression to be evaluated and used as the name of the event to be thrown. Exactly one of event or eventexpr must be specified. |
|
message |
A message string providing additional context about the event being thrown. For the pre-defined events thrown by the platform, the value of the message is platform-dependent. The message will be available as a variable within the scope of the |
|
messageexpr |
An ECMAScript expression to be evaluated and used as a message string, as documented under |
error.badfetch event is thrown if more or less than one of event and eventexpr are specified, or if more than one of message and messageexpr are specified.Block Catch Error Filled ForEach Help If Noinput Nomatch
None
None
<throw> cannot be used as a child of <foreach> when <foreach> is a child of <prompt> and vxmli.conformance.disallow_exec_content_within_prompts is set to true.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<catch event="goodbye">
Thank you for calling. Goodbye.
<exit/>
</catch>
<form>
<field name="field1" type="boolean">
<dtmf> * </dtmf>
<prompt>Please press the star.</prompt>
<filled>
<if cond="field1 == '*'">
<throw event="goodbye"/>
</if>
</filled>
</field>
</form>
</vxml>
|