< error >

The < error > element catches an error event. This is a shorthand notation for <catch event=“error”> that catches all events of type error.

<error
count="Integer"
cond="ECMAScript_Expression">
child elements
</error>
countThis attribute defines the event count, as in < catch > element. This attribute is optional.
condThe cond attribute is a Boolean condition to test to see if the event is caught by the <error>. This attribute is optional.

Two anonymous variables are available within the scope of the < catch > element: * _event – the event contains the name of the event that was thrown. * _message – the message contains the message string from the corresponding < throw > element, or a platform-defined value for events raised by the platform.

<field>, <form>, <initial>, <menu>, <object>, <record>, <subdialog>, <transfer>, <vxml>
<assign>, <audio>, <clear>, <disconnect>, <enumerate>, <exit>, <goto>, <if>, <prompt>, <reprompt>, <return>, <script>, <submit>, <throw>, <value>, <var>
None.
None.
<?xml version="1.0"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
 <error>
  <prompt>An error has occurred.</prompt>
  <exit/>
 </error>
 <form>
  <block>
   <audio expr="directory+'badaudio.wav'"/>
  </block>
 </form>
</vxml>