swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
    Related Concepts  
operator   is thrown    

Return type: Boolean
Returns:       

Returns true if the named throw has been thrown or you are within the named throw's catch block, 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 ] [ OMX ] [ OMX ] [ ERRORS ]

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

Copyright © OmniMark Technologies Corporation, 1988-2000.