Is there a way to determine which errors are reported by Email? I can get it to email on certain errors but not others; specifically, it seems like only ML.STAR errors step errors are reported, whereas code related errors (e.g., left hand side not a number and such) are not.
The send email on error feature enabled in system configuration editor is designed to only send automatic emails when waiting error dialogs are produced on ML_STAR and other device steps configured as a deck instrument.
To have Run Control send emails on other occurrences, you can use the ‘Send Email’ function of the HSLUtilLib library, which is default to all VENUS installations. The function is straightforward, only needing string variables/values as parameters for recipient address, subject and body.
This function is configured to use the same sender and SMTP settings that you already have specified in configuration editor used to send emails on error, unless you use functions within the library to temporarily overwrite those settings.
This function can be called programmatically whenever you want, whether in error handling situations or OnAbort.
For sending emails with the intent to capture programmatic errors or bugs, I recommend using the function ‘ErrGetDescription’ of the HSLErrLib library (also default) prior to the SendEmail function. This command will return a string whose value will contain a description of whatever the active/current error object is. This can be used as the body of the email to capture details.