Changeset e68d092 for tests/exceptions/resume.cfa
- Timestamp:
- May 7, 2020, 11:25:15 AM (3 years ago)
- Branches:
- arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8e16177, af7acb9
- Parents:
- d6566c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/resume.cfa
rd6566c1 re68d092 1 1 // Resumption Exception Tests 2 2 3 #include "except-mac.hfa"3 #include <exception.hfa> 4 4 #include "except-io.hfa" 5 5 … … 14 14 loud_exit a = "simple try clause"; 15 15 printf("simple throw\n"); 16 THROW_RESUME(&(zen){});16 throwResume &(zen){}; 17 17 printf("end of try clause\n"); 18 18 } catchResume (zen * error) { … … 25 25 try { 26 26 printf("throwing child exception\n"); 27 THROW_RESUME(&(moment_of){});27 throwResume &(moment_of){}; 28 28 } catchResume (zen *) { 29 29 printf("inner parent match\n"); … … 36 36 try { 37 37 try { 38 THROW_RESUME(&(yin){});38 throwResume &(yin){}; 39 39 } catchResume (zen *) { 40 40 printf("caught yin as zen\n"); … … 52 52 loud_exit a = "rethrow inner try"; 53 53 printf("rethrow inner try\n"); 54 THROW_RESUME(&(zen){});54 throwResume &(zen){}; 55 55 } catchResume (zen *) { 56 56 loud_exit a = "rethrowing catch clause"; … … 67 67 try { 68 68 try { 69 THROW_RESUME(&(yin){});69 throwResume &(yin){}; 70 70 } catchResume (yin *) { 71 71 printf("caught yin, will throw yang\n"); 72 THROW_RESUME(&(yang){});72 throwResume &(yang){}; 73 73 } catchResume (yang *) { 74 74 printf("caught exception from same try\n"); … … 83 83 try { 84 84 printf("throwing first exception\n"); 85 THROW_RESUME(&(yin){});85 throwResume &(yin){}; 86 86 } catchResume (yin *) { 87 87 printf("caught first exception\n"); 88 88 try { 89 89 printf("throwing second exception\n"); 90 THROW_RESUME(&(yang){});90 throwResume &(yang){}; 91 91 } catchResume (yang *) { 92 92 printf("caught second exception\n"); … … 104 104 try { 105 105 try { 106 THROW_RESUME(&(zen){});107 THROW_RESUME(&(zen){});106 throwResume &(zen){}; 107 throwResume &(zen){}; 108 108 } catchResume (zen *) { 109 109 printf("inner catch\n"); 110 110 } 111 THROW_RESUME(&(zen){});111 throwResume &(zen){}; 112 112 } catchResume (zen *) { 113 113 printf("outer catch\n");
Note: See TracChangeset
for help on using the changeset viewer.