Control Structures
These are examples of control structures. You may also be interested in:

 Conditional structures
 Exceptions
 Flow-control structures
 Loops

This task is to give an example of an exception handling routine
and to "throw" a new exception.



Related task

   Exceptions Through Nested Calls


void
throwing(void)
{
    o_text("throwing...\n");
    error("now!");
}
 
void
catching(void)
{
    o_text("ready to catch\n");
    if (trap(throwing)) {
	o_text("caught!\n");
    } else {
	# nothing was thrown
    }
}
 
integer
main(void)
{
    catching();
 
    return 0;
}