We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Global Error Handling Issues

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
Clayton
Posts: 6
Joined: Wed Apr 06, 2016 4:42 pm

Global Error Handling Issues

Post by Clayton »

I'm using the following code ...

Code: Select all

<vxml application="root.vxml" version="2.0">
    <catch event="error.badfetch">
        <log expr="_event" label="error.name"/>
        <log expr="_message" label="error.message"/>
        <audio src="resources/sorry.mp3">I'm sorry.</audio>
        <audio src="resources/technical-difficulties.mp3">It looks like we're experiencing technical difficulties.</audio>
        <goto next="operator.transfer.vxml"/>
    </catch>
    <form>
        <var name="test"/>
        <block>
            <form/>
        </block>
    </form>
</vxml>
... and I can't figure out why the default error handler is catching the badfetch and the one I specified directly in the document is being bypassed.

Can anyone help me figure out why?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: Global Error Handling Issues

Post by support »

The <catch> tags is for catching events that may happen during the call, for example, trying to fetch a non-existent document. It is not for catching code errors. If you look at your call logs for this app, you'll see a parse error like this:

DocumentParser::FetchDocument - Parse error in file "http://...", line 15, column 15 - Element 'form' is not valid for content model: '(#PCDATA|audio|enumerate|value|assign|clear|data|disconnect|exit|foreach|goto|if|log|prompt|reprompt|return|script|submit|throw|var)*'
errno: 205 uri http://...

Parse errors like this can be avoided and should be caught during QA.

Post Reply