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

is thrown

 

 

Return type: Boolean
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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:23 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.