ATC: CATCH FOR nnn Target
This command prevents the script from failing when non-critical situations (such as “file not found”) arise. By default, an alert is still sent.
- FOR nnn is optional. It specifies the number of lines in the script to monitor for non-critical situations. The default is 1. The maximum is 65536.
- Target is required; however, only one of the following options can be used at a time:
- TO whom indicates the specified user or contact to whom the alert should be sent. The alert recipient can be identified by login user ID, email address, user key, or the full name as entered in your system.
- SILENTLY sets the alert recipient to no one and no alert is generated.
- SHOW message text provides a friendly message to be displayed if there is a failure. You can include
- {0} for the number of problems
- {1} for the system default message
- {2} for a new line (line break)
- {3} for the information about the script line that was being processed
- Bookmarks for document data
Examples
ATC: CATCH FOR 20 TO support@spitfiremanagement.com
The above example means “during the next 20 lines in the script, if a non-critical situation arises, send an alert to support@spitfiremanagement.com.”
ATC: CATCH FOR 1 SHOW Attachment(s) are required! ATC: ERRORIF HASNOT DocAttachedFile WITH filename like '%JPG'; ATC: CATCH FOR 1 SHOW Template is required! ATC: ERRORIF HASNOT DocAttachedFile WITH RefreshBookmarks AND filename like '*.docx';
The above example means “during the next line in the script, if a non-critical situation arises, show Attachments are required! to the user instead of the default message. Then consider the lack of JPG attachments as an error that ends the script so that no alerts are sent and display the message instead. Similarly, set a new message, then consider the lack of a bookmarked word file as script ending.”
ATC: CATCH FOR 2 SHOW Check in all attachments! ATC: ERRORIF HAS DocAttachedFile WITH CheckOutStatus = 'O'
The above example means “during the next 2 lines in the script, if a checked-out attachment is still Open (checked out) and therefore throws an error, display the message Check in all attachments!”
Last updated: March 20, 2023 at 11:52 am; green text = new