<error>

Catches the error event.

Syntax

<error
    cond = "CDATA"
    count = "integer"
/>

Attributes

Attribute

Data Type

Required?

Default

Description

cond

CDATA

no

NA

Boolean expression that must evaluate to ECMAScript true for the catch to execute.

count

integer

no

NA

Occurrence number of the error. This permits alternate handlers to be defined for the error. For example, count=5 specifies the fifth occurrence of the error.

Details

This element is shorthand for <catch event="error">.

Parents

<field>, <form>, <initial>, <menu>, <record>, <subdialog>, <transfer>, <vxml>

Children

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

Example

<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
    <error>
        An error has occurred -- please call again later.
        <exit/>
    </error>

    <form id="formEntry">
        <block>
            Good applications are written defensively
        </block>
    </form> 
</vxml>

See Also

<catch>