source: doc/theses/andrew_beach_MMath/code/CrossFinally.java @ cf444b6

ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since cf444b6 was ea593a3, checked in by Andrew Beach <ajbeach@…>, 3 years ago

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

  • Property mode set to 100644
File size: 344 bytes
Line 
1// Cross a Try Statement with a Finally Clause
2
3public class CrossFinally {
4        public static void main(String[] args) {
5                int times = 1;
6                boolean shouldThrow = false;
7                if (0 < args.length) {
8                        times = Integer.parseInt(args[0]);
9                }
10
11                for (int count = 0 ; count < times ; ++count) {
12                        try {
13                                // ...
14                        } finally {
15                                // ...
16                        }
17                }
18        }
19}
Note: See TracBrowser for help on using the repository browser.