preparing 0.9 version, rename to crl1.h
[svn/Cll1h/.git] / demos / exceptions / failures.c
diff --git a/demos/exceptions/failures.c b/demos/exceptions/failures.c
deleted file mode 100644 (file)
index 2338f7f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#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.");
- }
-}
This page took 0.100488 seconds and 4 git commands to generate.