{
Email emailFrom, subjectTxt;
str emailFromName, emailBody;
var messageBuilder = new SysMailerMessageBuilder();
SendEmailHelper::getEmailTemplate(templateId);
if (emailTo != '')
{
System.Exception e;
try
{
messageBuilder.reset()
.addTo(emailTo)
.setSubject(subjectTxt)
.setBody(SysEmailMessage::stringExpand(
emailBody, SysEmailTable::htmlEncodeParameters(templateToken)))
.setFrom(emailFrom);
}
catch(e)
{
Error(strFmt("Error: %1", e.ToString()));
}
}
}
But the problem when the sender user doesn't have the permission for sending the email sendNonInteractive method throw error, but it isn't caught in the catch clause despite using the parent class of all exceptions, can you please tell me what may be the reason?
It seems as if the exception is swallowed or rethrown in the catch clause but basically it doesn't enter the catch clause