Plum DEV Documentation
voicexml:tags:throw

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

voicexml:tags:throw [2014/06/02 10:17]
jennifer added meta description
voicexml:tags:throw [2019/09/17 12:29]
Line 1: Line 1:
-{{description>​‹throw› VoiceXML tag details, attributes and VXML code example | The throw element throws either a predefined or application-defined event.}} 
-===== <​throw>​ ===== 
- 
- 
-The <​throw>​ element throws an event. These can be predefined ones or application-defined events. 
-====Attributes==== 
-| event | The event being thrown. | 
-| eventexpr |An ECMAScript expression evaluating to the name of the event being thrown. | 
-| message | A message string providing additional context about the event being thrown. The message is available as the value of "​_message"​ within the scope of the catch element. | 
-| messageexpr | An ECMAScript expression evaluating to the message string. | 
- 
-====Notes==== 
- 
-Exactly one of "​event"​ and "​eventexpr"​ must be specified. Exactly one of "​message"​ and "​messageexpr"​ may be specified. 
- 
-====Example==== 
-<​code>​ 
-<?xml version="​1.0"?>​ 
-<vxml version="​2.0">​ 
-  <​form>​ 
-    <​block>​ 
-      <throw event="​myevent"​ message="​hello,​ world!"/>​ 
-    </​block>​ 
-    <catch event="​myevent">​ 
-      <​prompt>​ 
-        Caught my event with the following message: 
-        <break time="​1s"/>​ 
-        <value expr="​_message"/>​ 
-      </​prompt>​ 
-    </​catch>​ 
-  </​form>​ 
-</​vxml>​ 
-</​code>​ 
- 
-The output of the above script would be: 
- 
-Computer: Caught my event with the following message: \\ 
-Computer: hello, world! 
- 
- 
-====Child Tags==== 
- 
-None 
- 
- 
-====Parent Tags==== 
- 
-[[voicexml:​tags:​block|<​block>​]],​ [[voicexml:​tags:​catch|<​catch>​]],​ [[voicexml:​tags:​error|<​error>​]],​ [[voicexml:​tags:​filled|<​filled>​]],​ [[voicexml:​tags:​foreach|<​foreach>​]],​ [[voicexml:​tags:​help|<​help>​]],​ [[voicexml:​tags:​if|<​if>​]],​ [[voicexml:​tags:​noinput|<​noinput>​]],​ [[voicexml:​tags:​nomatch|<​nomatch>​]] 
-