swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
action  

halt, halt-everything

 
 

Syntax

halt (with numeric-expression)?
halt-everything (with numeric-expression)?

Argument definitions

numeric-expression
Specifies the value to be returned to the operating system after halting. If not given, the return value is one (1).


Purpose

The keyword halt terminates an OmniMark program. No further OmniMark rules or actions are performed. Processing of all output files is completed, including processing of referents. Any referent resolution errors that occur will be reported. halt will run always clauses in all active scopes.

If you need to halt the OmniMark program without trying to finish writing to files or resolving referents, use halt-everything. halt-everything terminates the program in the same manner as halt, except that referents are not resolved and no errors indicating unresolved referents are issued. No user code is run at all.

The following fragment ends the program if more than 50 SGML errors occur and returns the number of SGML errors encountered to the operating system:

  markup-error
  do when #markup-error-count > 50
     put #error "Terminating because more than 50 SGML errors occurred%n"
     halt with #markup-error-count
  done

halt-everything is an extreme action intended to shut down the OmniMark process immediately. It relies on the operating system to perform any cleanup required. In situations where OmniMark is running in a thread (as it does in a WSB service, or a Java or ActiveX component), the resources allocated by the thread may not be freed until the calling program exits. halt-everything should be avoided in these situations.

    Related Syntax
 
Related Concepts
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:51:21 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.