#error is one of the built-in output
streams, and the standard error stream for
#error always refers to the standard error, also known as
-log argument is given on the command line, OmniMark writes all errors and
informative messages to
#error. If an implementation of OmniMark on a particular platform does not
distinguish between standard output and standard error, they are defined as the same destination.
#error is considered domain free by default, neither the
domain-free modifier nor
z modifier has any effect on it.
The following code illustrates the use of
#error for reporting errors:
global integer list-count process local integer list-items variable ; ... do when number of list-items != list-count local integer temp put #error "Found a condition that shouldn't have happened:" set temp to number of list-items put #error " list-count = %d(list-count), but list-items has %d(temp) item(s).%n" halt with 2 ; signals an error condition while stopping done
Line breaking rules and
translate rules are never applied to
On most systems, standard error (and as a result
#error) is unbuffered: that is, text written to it is
immediately output. This can be changed by declaring
#error to be buffered:
declare #error has buffered
#errorcan also be declared
unbuffered, although this is the default.