08-23-2018 09:14 AM
May be a dumb question. I have uccx scripts and i want to handle exceptions. I'd like to capture the exception message and put in a string variable for later use. When i look at the on exception goto step it appears that you would be able to do that with the save root cause (optional) portion. I have tried every variable type and it does not see in the drop down. Is there a way to do this??? I only want to use the exception message to persist somewhere else so i may review later.
Solved! Go to Solution.
06-03-2020 08:44 AM
06-19-2020 03:37 PM
Anthony, if you ever read this, is there a way to filter out a certain exception from being E-mailed to me when I have it setup to E-mail me on the WFExecutionException ? I like the way it functions now and it works great but if someone hangs up in the script it generates "Contact id: 248, Contact terminated remotely", which will get very annoying once this goes into production. I did talk to our E-Mail admin about having one of our e-mail filters just pick up on "Contact terminated remotely" in the body of the e-mail CCX sends me and delete it but he hasn't done anything for me yet.
06-19-2020 06:53 PM
If I ever read this? I live on these forums my man! :P
If you register more than one Exception handler, the more specific exception handler goes below or after the more generic handler and will be triggered instead of the more generic one.
E.g.,
Start On Exception (WFExecutionException) Goto Send Email On Exception (ContactInactiveException) Goto End of Script Accept... Play Prompt... Menu... Select Resource... Send Email: Create Email... Send Email... Goto End of Script End of Script: End
06-23-2020 02:57 PM
This was almost too simple Anthony. I must remember the sheer power of string functions (contains) in the if/then context.. Like the variable (WhatBroke) that holds the message its about to e-mail me: WhatBroke.contains("Contact terminated remotely") , then clear exception and end script. Works perfect!
06-23-2020 03:52 PM
06-23-2020 04:28 PM
I have learned there are 10 ways to kill that cat with anything Cisco. I re-read what you were saying about the more and less generic exception order and thought about it. I re-did my script. Your way is more short and precise as my way was perhaps entering what can become 'spaghetti code'? You know what I mean. Thanks!
06-23-2020 04:30 PM
06-24-2020 11:54 AM
Thanks for the tip, I'm always learning. Had to have somewhere to 'goto', so I sent them here..
06-24-2020 02:46 PM
02-07-2022 09:20 AM
Hi, Anthony. What is the Set i = 1 / 0 in the above example for?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide