Page 1 of 1
catch error
Posted: Thu May 04, 2006 12:00 pm
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
use <catch> to catch and handle IVR errors
Posted: Mon May 08, 2006 10:24 am
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
Posted: Tue May 09, 2006 8:27 pm
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>
Posted: Tue May 09, 2006 11:11 pm
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>
IVR error fixed by adding catch handler to calling page
Posted: Tue May 09, 2006 11:33 pm
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