Last change
on this file since 0497b6ba was 0cc43e1, checked in by Andrew Beach <ajbeach@…>, 5 years 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 |
|
---|
5 | TRIVIAL_EXCEPTION(yin);
|
---|
6 | TRIVIAL_EXCEPTION(yang);
|
---|
7 |
|
---|
8 | void collideFinally() {
|
---|
9 | try {
|
---|
10 | throw (yin){};
|
---|
11 | } finally {
|
---|
12 | throw (yang){};
|
---|
13 | }
|
---|
14 | }
|
---|
15 |
|
---|
16 | int 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.