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


try  {
    die "I'm dead!";        # throws an exception of type 'error'
}
catch { |type, msg|
    say "type: #{type}";    # type: error
    say "msg: #{msg}";      # msg: I'm dead! at test.sf line 2.
};
 
say "I'm alive...";
die "Now I'm dead!";        # this line terminates the program
say "Or am I?";             # Yes, you are!