On Exception (FileNotFoundException) IPCC Express 4.04

Unanswered Question
Sep 13th, 2006

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.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 3 (3 ratings)
mtriebwa Wed, 09/20/2006 - 13:59

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

michaelmiu Thu, 03/15/2007 - 22:21

mtriebwa,

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

Thanks!

mtriebwa Fri, 03/16/2007 - 07:28

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.

michaelmiu Fri, 03/16/2007 - 08:03

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!

mtriebwa Fri, 03/16/2007 - 09:33

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.

rainvillem Mon, 03/19/2007 - 05:43

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

mtriebwa Mon, 03/19/2007 - 10:51

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.

Roman Rodichev Fri, 05/20/2011 - 09:51

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

Actions

Login or Register to take actions

This Discussion

Posted September 13, 2006 at 11:52 AM
Stats:
Replies:10 Avg. Rating:3
Views:435 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard