The following functions can be used to Log information and errors in the Action Log. The Message functions can be used to display a message to screen (or if executed under FlowServer they will write an entry to Windows Event Viewer)
You should also look at the See "Exceptions" functions for methods to extract error information for use in the logging.