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

catch error

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
yunyun
Posts: 21
Joined: Mon Jan 23, 2006 8:31 pm

catch error

Post by yunyun »

Hello,

I'm wondering if it's possible that Plum forwards the error back to our server (maybe to a JSP file) insteading of reading "a serious error type of" and hanging up. It will be great that our application can catch this error and handle it in a more friendly way. Can I use the <catch> tag to do it?

Thanks,

Yunyun

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

use <catch> to catch and handle IVR errors

Post by support »

Hi,

Yes, you should be able to use the <catch> tag to catch and handle all kinds of IVR errors, even general ones (e.g. error.badfetch).


Regards,

Plum Support
Last edited by support on Thu Jan 14, 2010 3:40 pm, edited 3 times in total.

yunyun
Posts: 21
Joined: Mon Jan 23, 2006 8:31 pm

Post by yunyun »

Hi,

I tried this example but I still heard the error message from Plum not the message I specify inside catch tag. Does catch work in this way? Thanks,

Code: Select all

<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" application="welcome.jsp">
<catch event="error.badfetch">
    <prompt>
        Hello an error happens.
    </prompt>
</catch>

<form>
    <block>
        <prompt>
            Hello no error happens.
        </prompt>
    </block>
</form>
</vxml>

yunyun
Posts: 21
Joined: Mon Jan 23, 2006 8:31 pm

Post by yunyun »

If I purposely make a mistake at the opening block tag as following, I still heard Plum's error message not what I specified for catch tag.

Code: Select all

<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml" application="welcome.jsp"> 
<catch event="error.badfetch"> 
    <prompt> 
        Hello an error happens. 
    </prompt> 
</catch> 

<form> 
    <lock> 
        <prompt> 
            Hello no error happens. 
        </prompt> 
    </block> 
</form> 
</vxml>

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

IVR error fixed by adding catch handler to calling page

Post by support »

Hello,

The IVR issue you are experiencing is that the even "error.badfetch" is being thrown in the page you are transitioning from, not the page you are transitioning to. Therefore if you are concerned that a page fetch is going to cause an IVR error you need to add the <catch> handler to the calling page:

page1.vxml

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<catch event="error.badfetch">
    <prompt>
        Hello an error happens.
    </prompt>
</catch>

<form>
    <block>
        <goto next="page2.vxml"/>
    </block>
</form>
</vxml>
page2.vxml

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form>
    <lock>
        <goto next="page2.vxml"/>
    </block>
</form>
</vxml>
The error handler can not be used in the page you are transitioning to because the page could not be validated. Once that page transition is successful any handlers on the new page will override the previous event handlers. Hope this helps.

Regards,
Plum Support

Post Reply