SysIII/usr/src/man/docs/mm_man/s13err

.H 1 "ERRORS AND DEBUGGING
.H 2 "Error Terminations
When a macro discovers an error,
the following actions occur:
.BL
.LI
A break occurs.
.LI
To avoid confusion regarding the location of the error,
the formatter output buffer (which may contain some text)
is printed.
.LI
A short message is printed giving the name of
the macro that found the error,
the type of error,
and the approximate line number (in the current input file)
of the last processed input line.
(All the error messages are explained in Appendix\ D.)
.LI
Processing terminates,
unless the register
.I D
{2.4}
has a positive value.
In the latter case, processing continues even though the output is
guaranteed to be deranged from that point on.
.LE
.VL 4\"WARNING
.LI "\ \(rh"
.I
The error message is printed by
writing it directly to the user's terminal.
If an output filter, such as
.R
300(1),
450(1),
.I or
hp(1)
.I
is being used to post-process
.R
nroff
.I
output, the message may be garbled
by being intermixed with text
held in that filter's output buffer.
.LI "\ \(rh"
If either
.R
tbl(1)
.I or
eqn(1)/neqn(1),
.I
or both are being used,
and if the 
.R
-\f3o\fPlist 
.I
option of the formatter 
causes
the last page of the document 
.R
not
.I
to be printed,
a harmless ``broken pipe'' message results.
.R
.LE
.H 2 "Disappearance of Output"
This usually occurs because of an unclosed diversion
(e.g., missing \f3.\fPFE or \f3.\fPDE).
Fortunately, the macros that use diversions are careful about it,
and they check to make sure that illegal nestings do not occur.
If any message is issued about a missing \f3.\fPDE or \f3.\fPFE, the appropriate
action is to search backwards from the termination point
looking for the corresponding \f3.\fPDS, \f3.\fPDF, or \f3.\fPFS\f3.\fP
.P
The following command:
.HC
.Es1
grep -n "\*^\\\\\f3.\fP[EDFT][EFNQS]" files \f3.\|.\|.\fP 
.Ee
.HC ^
prints all the \f3.\fPDS, \f3.\fPDF, \f3.\fPDE, \f3.\fPFS, \f3.\fPFE, \f3.\fPTS, \f3.\fPTE, \f3.\fPEQ,
and \f3.\fPEN macros found in
.I "files \f3.\|.\|.\fP" ,
each preceded by its file name and the line number in that file.
This listing can be used to check for illegal
nesting and/or omission of these macros.