Changeset 7f9968a for tests/exceptions/resume.cfa
- Timestamp:
- Jun 24, 2020, 12:30:42 PM (3 years ago)
- Branches:
- ADT, arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8b58bae
- Parents:
- a8a3485
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/resume.cfa
ra8a3485 r7f9968a 8 8 TRIVIAL_EXCEPTION(zen); 9 9 TRIVIAL_EXCEPTION(moment_of, zen); 10 11 void in_void(void); 10 12 11 13 int main(int argc, char * argv[]) { … … 121 123 printf("outer catch\n"); 122 124 } 125 printf("\n"); 126 127 in_void(); 123 128 } 129 130 // Do a throw and rethrow in a void function. 131 void in_void(void) { 132 try { 133 try { 134 printf("throw\n"); 135 throwResume (zen){}; 136 } catchResume (zen *) { 137 printf("rethrow\n"); 138 throwResume; 139 } 140 } catchResume (zen *) { 141 printf("handle\n"); 142 } 143 }
Note: See TracChangeset
for help on using the changeset viewer.