source: tests/bugs/233.cfa

Last change on this file was 0cc43e1, checked in by Andrew Beach <ajbeach@…>, 10 months ago

Added example for bug#233.

  • Property mode set to 100644
File size: 351 bytes
Line 
1// Exceptions collide mid-flight.
2
3#include <exception.hfa>
4
5TRIVIAL_EXCEPTION(yin);
6TRIVIAL_EXCEPTION(yang);
7
8void collideFinally() {
9        try {
10                throw (yin){};
11        } finally {
12                throw (yang){};
13        }
14}
15
16int main(int argc, char * argv[]) {
17        try {
18                collideFinally();
19        } catch (exception_t * any) {
20                printf("Caught: %s\n", any->virtual_table->msg(any));
21        }
22}
Note: See TracBrowser for help on using the repository browser.