Proactively Using RaiseError

Often in the development stage, the primary sending audiences are incomplete or based completely on fictitious data. Making assumptions about sending audience attributes and external data can get you into trouble. One way to approach this in code is to commit to adding extra conditionals to handle any aberrations that may come up in your data. A good assumption is to expect data to be bad or missing. If those attributes do not exist or are not in the format you expect, then check them with a conditional and use the RaiseError function to ensure that the email does not get sent. RaiseError allows you to either abort the email send entirely or to skip a particular Subscriber where these specific error conditions exist. It is generally better to abort the send or skip the Subscriber to send a broken email to Subscribers.