contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
built-in variable   #error    
  Related Syntax   Related Concepts  

Purpose

One of the built-in program output streams, and the standard error output stream for OmniMark.

#error always refers to a "standard error" ("stderr"), and can be used in the same manner as #process-output.

If no "-log" command-line argument is given, OmniMark places all errors and informative messages in this stream. (Defining "-log" does not change the definition of #error; it remains the "standard error" output.) If a system does not distinguish between "standard output" and "standard error", they are defined as the same destination.

Since this stream is considered "domain free" by default, neither the domain-free modifier nor the "%z" modifier has any effect on it.

The following code illustrates the use of the #error stream for standard error reporting:

  local counter list-items
  do when number of list-items != list-count
     local counter 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 and translation are never applied to the #error stream.

On most systems, "standard error" is unbuffered. That is, text written to it is immediately output.

The #process-output stream in OmniMark is normally buffered, which will lead to error messages appearing before output from #process-output.

By default, the #error stream in any program that uses referents is treated as if it were opened with referents-displayed.

  Related Syntax
   #process-output
   domain-free
   referents-displayed
 
Related Concepts
   Input/Output
   Referents: suppressed
   Streams: changing modifiers on #process-output and #error
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:00:59 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.