09-13-2006 11:52 AM - edited 03-14-2019 12:04 AM
I am currently writing a script to verify if an XML file exists to parse the contents. The On Exception (FileNotFoundException) does not seem to work. The flow doesnt follow the goto statement. When running a debug the warning window does come up with a "java.io.FileNotFoundException" though.
09-19-2006 10:30 AM
The below link may also assist you with questions you have regarding your script:
http://www.cisco.com/univercd/cc/td/doc/product/voice/sw_ap_to/apps_3_1/english/admn_app/step.pdf
09-20-2006 01:59 PM
Thanks for the link, I have gone through the reference documentation but still no luck.
03-15-2007 10:21 PM
mtriebwa,
Did you ever solve this issue? I'm running into the same...
Thanks!
03-16-2007 07:28 AM
michaelmiu,
Yes, I eventually figured it out. IPCC throws a different exception not FileNotFoundException. I believe it's com.cisco.file.FileException but it's been a while. I'll see if I can go through some of my older scripts and find the exact exception to look for.
03-16-2007 08:03 AM
Hi mtriebwa,
I think I also tried com.cisco.file.FileException without any success.
If you can check your older scripts, it would be greatly appreciated.
Thanks again!
03-16-2007 09:33 AM
Ah ha, found it. What I did was:
On Exception (DocumentException) Goto "LABEL"
docObj = Create XML Document (DOC["status.xml")
stateVar = Get XML Document Data (docObj, "/descendant:state"
When the Get XML document data function runs it will throw a DocumentException even though the CRS editor reports a "java.io.FileNotFoundException".
I tried raising the issue with Cisco but didn't get too far.
03-19-2007 05:43 AM
Just curious to know if one of you have ever seen some documentation about these exceptions.
Having information like What exactly are each exception and when they are thrown would be really helpfull.
I understand that it is a good thing to be able to catch these exception, but without knowing the nature of each one...
For my part, I'm still trying to find out how I could catch exception thrown when a script fail to launch a VXML application.
I use the create document step followed by a VoiceBrowser step. I
If the server that is hosting my vxml application is not available, I want to be able to handle it.
I know that if I use the On Exception with the com.cisco.app.ApplicationException I catch it, but I also
catch all other exceptions. It is then a catch all, wich is not usefull for me because I need to distinguish.
As Mark and Michael have shown in their previous post, there is no direct relation between the exception shown
in the log files and the exceptions listed in the "On Exception" step.
In my situation, I can see in the log files that a com.cisco.voicebrowser.VBEvent, error.badfetch is thrown.
I tried to use the "On Exception" step to catch the folowing exception without luck:
DocumentException
DocumentIOException
DocumentNotFoundException
In my particular situation, The VXML event called "error.badfetch" is specific to VXML and not to the CRS.
I know that I can catch this exception from a VXML application, but in this particular exception, the Cisco's VoiceBrowser
can't even find the application.
I think I can workaround this problem by having a small VXML application located on the CRS to launch my real application.
This small VXML application would indeed catch the "error.badfetch" event and return the error to my CRS Script.
But with this solution, I feel that I'm doing too much work that I shouldn't.
Michel
03-19-2007 10:51 AM
I found no documentation on exception specifics. I'd like the developers of the CRS editor to review how they display the execeptions within a debug session. The exceptions displayed in a debug session appear to display the "base" exception rather then the top-level(com.cisco ones) object exception.
05-20-2011 09:51 AM
Hi,
did you find a way to detect when Get XML Document Data returns nothing to a string. If I access a string I get an exception about nullstring, but I can't seem to find the correct exception.
Roman
05-22-2011 10:02 PM
checking "== null" worked
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: