General-Purpose Mail Filter
When the running program encounters a condition it is not able to handle, it signals an exception. To illustrate the concept, let’s consider the execution of the following code fragment:
if primitive_hasmx(domainpart($f)) accept fi
primitive_hasmx (see primitive_hasmx) tests whether the
domain name given as its argument has any ‘MX’ records. It should
return a boolean value. However, when querying the Domain Name
System, it may fail to get a definite result. For example, the DNS
server can be down or temporary unavailable. In other words,
primitive_hasmx can be in a situation when, instead of returning
‘yes’ or ‘no’, it has to return ‘don't know’. It has
no way of doing so, therefore it signals an exception.
Each exception is identified by exception type, an integer number associated with it.
This document was generated on January 3, 2019 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.