Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Catch error codes

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

Re: Catch error codes

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.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

Re: Catch error codes

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?

Re: Catch error codes

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.  =)

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
223
Views
0
Helpful
3
Replies