2: /* A few separate TRY blocks with THROWs in them.
  3:    And also one THROW outside. */

  5: #include <stdio.h>

  7: #include "exception-local.h"

  9: int
 10: main (int argc, char **argv)
 11: {
 12:   try
 13:     {
 14:       throw (0);
 15:     }
 16:   except
 17:     {
 18:       on (0)
 19:         {
 20:           printf ("Exception 1 handled. OK.\n");
 21:         }
 22:     }

 24:   try
 25:     {
 26:       throw (1);
 27:     }
 28:   except
 29:     {
 30:       on (1)
 31:         {
 32:           printf ("Exception 2 handled. OK.\n");
 33:         }
 34:     }

 36:   throw (2);
 37:   exit (0);
 38: }