PS TEXT FORMAT Reference Manual

Introduction to TFORM
11387 Tandem Computers Incorporated 3–29
ERROR You can use the ERROR command to write an error message for a user-
supplied macro, function, or construct.
What to Enter
\ERROR
string
Examples:
\ERROR "This printer requires a different DEVICE ^TYPE."
\ERROR "I couldn't find the requested file."
How to Use ERROR
If you are writing a macro, function, or construct (for example, an IF
construct at the beginning of your file), you can include one or more
ERROR commands to create messages that can be produced from within
the macro, function, or construct. These error messages are integrated into
the TFORM command error messages. You can write the error message so
it occurs when a bad argument is passed in the macro or function or when a
false condition in a conditional operation is found.
For example, you can write an IF construct that checks your parameter
device type against the class of device you use to print output. First, make
the IF condition true when the specified parameter device type does not
agree with the output device you normally use. Then include an ERROR
command in your IF construct to provide TFORM with the text of an error
message. When the IF condition is true—for example, the printer you want
to use does not correspond to the specified device type—TFORM can issue
an error message reminding you to change the parameter device type.