aboutsummaryrefslogtreecommitdiff
path: root/tests/core/test_exceptions_white_list_2.c
blob: 40d7c56c511f32ba716bf7209fd044dea6c01cb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>

void throwhere(void) {
    throw(1);
}

void (*funptr)(void) = throwhere;

void nocatch(void) {
    try {
        funptr();
    }
    catch (...) {
        printf("ERROR\n");
    }
}

int main(void) {
    try {
        nocatch();
    }
    catch (...) {
        printf("SUCCESS\n");
    }
    return 0;
}