cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
527
Views
0
Helpful
3
Replies

Catch error codes

rbblue234
Level 1
Level 1

I'm attempting to catch the exception error codes and have them attached to an email that i send out.  in expression editor there is an option to save root cause.  But i'm not sure how to make use this and i could not find any examples ro docs that describe what it's looking for. Any help?

untitled.GIF

3 Replies 3

Anthony Holloway
Cisco Employee
Cisco Employee

I'm pretty sure it doesn't store the exception in any value.  You can however, let the script fail, and write yourself a custom Default Script, and in the Get Trigger Info step the Aborting Reason will be the reason the script failed, then send that off to the e-mail recipient.

I have a get trigger step at the top of the script.  If i set aborting reason there will it be updated or will i have to pull it again?

can you post an example?

I think you've misunderstood me.  You create another script, which is triggered only when your main script fails.  It's in this new script that you use the Get Trigger Info step and email yourself the details of the failure.  Perhaps track the major steps in your script with a string variable and write that too.

Look at one of your applications, and do you see at the bottom of the page there is a default script you can set?  Yeah, that's the one.  =)