swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax    
declaration/definition   declare catch    

Syntax

  declare catch catch-parameter*


Purpose

You can use declare catch to declare the name and the parameters of a catch that you will use elsewhere in your program. The following declares a catch named no-planet:

  declare catch no-planet

The catch declaration can also declare parameters, following the same form as function parameters. Read-only, value, and remainder parameters are supported, but not modifiable. Optional parameters are not supported. See declare function for a full description of function parameters.

The following is an example of a catch declaration with parameters:

  declare catch invalid-item
   value stream the-item
   error value stream the-error
   times value integer num-times 

Catches can use either the heralded or parameterized form for declaring arguments, just like function definitions. The same considerations as for functions apply to choosing one or the other.

It is a compile-time error to use a catch that has not been declared. It is also a compile-time error to declare the same catch twice.

    Related Syntax
   catch
 
 
----

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

Generated: August 11, 2000 at 3:07:08 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.