All ThreatConnect ™ Exchange Apps should write an exit message on successful or failed execution. The TcEx Frameworks provides the message_tc() method to handle writing this message. The contents of message_tc are shown in the ThreatConnect UI and should provide a meaning message to the user.

Warning

The Message TC exit message only supports up to 255 characters. All data added after that will be truncated.

tcex=TcEx()<...snipped>try:withopen(datafile,'r')asfh:data=fh.read()except:tcex.message_tc('Failed to open datafile for reading.')tcex.exit_code(1)<snipped...>tcex.message_tc('File successfully read.')tcex.exit()