I’m confused as to why this method always returns even when an exception is caught… shouldn’t it return after logging the error?
private def sendConfCode(sendTo)
{
def confCode = genConfCode()
try
{
mail.sendMessage(sendTo.toString(), "Your confirmation code is", confCode)
//insert confCode into temporary banner table?
}
catch(Exception e)
{
logIt.writeLog(e.message, Priority.ERR)
}
return confCode + " - " + sendTo
}
Correct code: