source: doc/theses/andrew_beach_MMath/code/cross-resume.cfa@ 1f45c7d

ADT ast-experimental enum forall-pointer-decay jacob/cs343-translation new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since 1f45c7d was ea593a3, checked in by Andrew Beach <ajbeach@…>, 4 years ago

First draft of all the exception benchmarks. There is an issue with the Cforall linking.

  • Property mode set to 100644
File size: 482 bytes
Line 
1// Cross a Try Statement With Finally Clause
2#include <exception.hfa>
3#include <stdlib.hfa>
4
5EHM_EXCEPTION(not_raised_exception)();
6
7int main(int argc, char * argv[]) {
8 unsigned int times = 1;
9 unsigned int total_frames = 1;
10 if (2 < argc) {
11 times = strtol(argv[1], 0p, 10);
12 }
13 if (3 < argc) {
14 total_frames = strtol(argv[2], 0p, 10);
15 }
16
17 for (unsigned int count = 0 ; count < times ; ++count) {
18 try {
19 // ...
20 } catchResume (not_raised_exception *) {
21 // ...
22 }
23 }
24}
Note: See TracBrowser for help on using the repository browser.