swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Related Concepts  
operator  

is thrown

 
 

Return type: Switch
Returns:       Returns true if the named throw has been thrown but has not yet been caught, and false otherwise. Replacing is with isnt will reverse the results.

Syntax

named-throw (is | isnt) thrown


Purpose

You can use the is thrown test to determine if a throw is in progress to the catch name specified.

The catch name specified can be any of the following:

A compile-time error is produced if the programmer-defined catch name is not declared within the program.

Because OmniMark allows multiple throws at the same time, you may not want to produce an additional throw while another throw is being processed. Using is thrown can avoid having multiple throws caused by the same error condition.

Actions in an always clause are always executed at the end of a local scope, whether a throw is in progress or not. A throw within an always can leave you with two throws active at once. If this is inappropriate, you can test as follows:

  do 
     submit file foo
     always
     do when count > 5000
        throw bar unless #external-exception is thrown 
     done
  done

      Related Concepts
   Catch and throw
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.