Changes in tests/exceptions/interact.cfa [3eb5a478:e68d092]
- File:
-
- 1 edited
-
tests/exceptions/interact.cfa (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/interact.cfa
r3eb5a478 re68d092 1 1 // Testing Interactions Between Termination and Resumption 2 2 3 #include "except-mac.hfa"3 #include <exception.hfa> 4 4 #include "except-io.hfa" 5 5 … … 10 10 // Resume falls back to terminate. 11 11 try { 12 THROW_RESUME(&(star){});12 throwResume &(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 THROW_RESUME(&(star){});19 throwResume &(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 THROW_RESUME(&(star){});45 throwResume &(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 THROW_RESUME(error);66 throwResume error; 67 67 } 68 68 } catchResume (star *) { … … 75 75 try { 76 76 try { 77 THROW_RESUME(&(star){});77 throwResume &(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 089 88 printf("\n"); 90 89 … … 95 94 try { 96 95 printf("throwing resume moon\n"); 97 THROW_RESUME(&(moon){});96 throwResume &(moon){}; 98 97 } catch (star *) { 99 98 printf("termination catch\n"); 100 99 } 101 100 printf("throwing resume star\n"); 102 THROW_RESUME(&(star){});101 throwResume &(star){}; 103 102 } catchResume (star *) { 104 103 printf("resumption star catch\n"); … … 106 105 } catchResume (moon *) { 107 106 printf("resumption moon catch, will terminate\n"); 108 THROW(&(star){});107 throw &(star){}; 109 108 } 110 109 } catchResume (star *) { 111 110 printf("outermost catch (error)\n"); 112 111 } 113 #endif114 112 }
Note:
See TracChangeset
for help on using the changeset viewer.