cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1516
Views
11
Helpful
10
Replies

On Exception (FileNotFoundException) IPCC Express 4.04

mtriebwa
Level 1
Level 1

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.

10 Replies 10

sbilgi
Level 5
Level 5

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

Thanks for the link, I have gone through the reference documentation but still no luck.

mtriebwa,

Did you ever solve this issue? I'm running into the same...

Thanks!

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.

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!

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.

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

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.

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

checking "== null" worked

Getting Started

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: