Changes in tests/exceptions/interact.cfa [e68d092:3eb5a478]
- File:
-
- 1 edited
-
tests/exceptions/interact.cfa (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/interact.cfa
re68d092 r3eb5a478 1 1 // Testing Interactions Between Termination and Resumption 2 2 3 #include <exception.hfa>3 #include "except-mac.hfa" 4 4 #include "except-io.hfa" 5 5 … … 10 10 // Resume falls back to terminate. 11 11 try { 12 throwResume &(star){};12 THROW_RESUME(&(star){}); 13 13 } catch (star *) { 14 14 printf("caught as termination\n"); … … 17 17 try { 18 18 loud_region a = "try block with resume throw"; 19 throwResume &(star){};19 THROW_RESUME(&(star){}); 20 20 } catch (star *) { 21 21 printf("caught as termination\n"); … … 29 29 try { 30 30 try { 31 throw &(star){};31 THROW(&(star){}); 32 32 } catchResume (star *) { 33 33 printf("resume catch on terminate\n"); … … 43 43 try { 44 44 try { 45 throwResume &(star){};45 THROW_RESUME(&(star){}); 46 46 } catch (star *) { 47 47 printf("terminate catch on resume\n"); … … 58 58 try { 59 59 try { 60 throw &(star){};60 THROW(&(star){}); 61 61 } catchResume (star *) { 62 62 printf("inner resume catch (error)\n"); … … 64 64 } catch (star * error) { 65 65 printf("termination catch, will resume\n"); 66 throwResume error;66 THROW_RESUME(error); 67 67 } 68 68 } catchResume (star *) { … … 75 75 try { 76 76 try { 77 throwResume &(star){};77 THROW_RESUME(&(star){}); 78 78 } catch (star *) { 79 79 printf("inner termination catch\n"); … … 81 81 } catchResume (star * error) { 82 82 printf("resumption catch, will terminate\n"); 83 throw error;83 THROW(error); 84 84 } 85 85 } catch (star *) { 86 86 printf("outer terminate catch (error)\n"); 87 87 } 88 #if 0 88 89 printf("\n"); 89 90 … … 94 95 try { 95 96 printf("throwing resume moon\n"); 96 throwResume &(moon){};97 THROW_RESUME(&(moon){}); 97 98 } catch (star *) { 98 99 printf("termination catch\n"); 99 100 } 100 101 printf("throwing resume star\n"); 101 throwResume &(star){};102 THROW_RESUME(&(star){}); 102 103 } catchResume (star *) { 103 104 printf("resumption star catch\n"); … … 105 106 } catchResume (moon *) { 106 107 printf("resumption moon catch, will terminate\n"); 107 throw &(star){};108 THROW(&(star){}); 108 109 } 109 110 } catchResume (star *) { 110 111 printf("outermost catch (error)\n"); 111 112 } 113 #endif 112 114 }
Note:
See TracChangeset
for help on using the changeset viewer.