+#include "cll1.h"
+
+void some_function(int i)
+{
+ if(i==2)
+ {
+ fail(EVIL_FAILURE);
+ }
+ if(i==7)
+ {
+ some_function(2);
+ }
+ if(i==6)
+ {
+ fail(LOCAL_FAILURE);
+ }
+ printf("nuda #%d\n",i);
+}
+
+program
+{
+ try
+ {
+ some_function(1);
+ some_function(2);
+ some_function(6);
+ }
+ else_switch_failures
+ {
+ case EVIL_FAILURE: puts("serious failure detected!"); break;
+ default: puts("sorry, vole, error!");
+ }
+
+ try
+ {
+ some_function(1);
+ some_function(3);
+ some_function(6);
+ some_function(2);
+ }
+ else
+ {
+ puts("sorry, vole, error!");
+ }
+
+ try
+ {
+ some_function(1);
+ some_function(6);
+ }
+ else_catch(EVIL_FAILURE)
+ {
+ puts("Totally screwed.");
+ exit(-1);
+ }
+ else
+ {
+ puts("We survived this failure.");
+ }
+
+ try
+ {
+ some_function(3);
+ some_function(7);
+ }
+ else_catch(EVIL_FAILURE)
+ {
+ puts("totally screwed.");
+ exit(-1);
+ }
+ else
+ {
+ puts("we survived this failure.");
+ }
+}