cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
251
Views
0
Helpful
0
Replies

throwing custom exception from a ccx script

dbonagir
Cisco Employee
Cisco Employee

Hello

So, I've created a jar file with some classes I've created.

Some of this classes are custom exceptions.

I've created some scripts in UCCX 11.0 with some code relevant to my custom classes.

For demonstration purposes, my code is:

{

try {

IntVariable = Integer.parseInt(StringVariable);

if (IntVariable < 30) {throw new myPackage.MyCustomException();}

} catch (Exception e) {

IntVariable = 30;

}

}

I've debugged this script,

I've uploaded this script to the repository,

everything looks OK.

When I try to create an application that leads to this script,

I get a popup message "An error occurred while loading the script. Please check log for more details."

Things I've tried:

  1. I've searched the MIVR logs and the stderr logs, didn't found anything. I didn't really expected to find any thing in these specific logs, but I don't know any admin logs I can look in.
  2. Replaced inside my test CCX script "myPackage.MyCustomException" with "Exception" - Problem Solved!
  3. After this test I assumed my custom exception was my problem, so I've created and new jar file which contains only a new myCustomException class, inside my own package myPackage - Problem Remains!
  4. After this test, i thought maybe the problem is my package, maybe CCX has trouble throwing custom exceptions inside packages, so I've created and new jar file which contains only myCustomException class, default package - Problem Solved!
  5. So at this point I was sure the problem is using custom exceptions inside packages, so I went back to my original package and recreated all of my custom exceptions inside the default package, leaving my package with only my non-exception custom classes. Exported the new and improved project to a jar file, updated my script, uploaded my script, created the application again and... - Problem Remains!

The thing is, My scripts doesn't actually requires a custom exception, I can achieve the same result using regular exceptions.

But... I would prefer using my own exceptions, makes troubleshooting much more easier.

Any ideas??

Thanks,

Tomer.

0 Replies 0