3.13 error
Element type |
error |
Attributes |
cond | count |
Parents |
field | form | initial | menu | object | record | subdialog | transfer | vxml |
Children |
assign | audio | clear | disconnect | enumerate | exit | goto | if | log | prompt | reprompt | return | script | submit | throw | value | var |
Description |
Shorthand for catching an error event. The contained event-handling code has access to the following variables:
|
DTD
<!ELEMENT error (%executable.content;)* > <!ATTLIST error %event.handler.attrs; >
Language model
Attributes
-
cond : expression = true
-
This event handler will only be executed if this ECMAScript expression evaluates to true.
-
count : integer
-
The event handler should be run only when the counter associated with a menu, form, or form item is equal to the quantity specified by this attribute. In the case where there is no count value equal to the counter, then the error with the lowest count value, which is greater than the counter, will be selected. When the counter is greater than all count values, the catch with the highest count value will be selected.
Children
-
executable.content
-
The code to be run to handle the thrown event, assuming the conditions specified by the count and cond attributes are met.
Examples
Example 3-15 An error defining handling behavior for the badfile form
<?xml version="1.0" encoding="iso-8859-1"?> <vxml version="1.0"> <error count="1"> <prompt> Here we catch any errors. It appears we have caught a <value expr="_event"/> event. Additional information includes <value expr="_message"/>. </prompt> <goto next="#badfile"/> </error> <error count="2"> <prompt>This time we will exit.</prompt> <exit/> </error> <form id="badfile"> <block><audio src="badfilename.au"/></block> </form> </vxml>