MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main

Function main

test/core/test_exceptions_longjmp4.cpp:10–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10int main() {
11 int jmpval = setjmp(buf);
12 if (jmpval != 0) {
13 // This is not reached, because foo() doesn't longjmp. This test checks
14 // compilation of a setjmp call with a nested try.
15 printf("setjmp returned for the second time\n");
16 return 0;
17 }
18 try {
19 foo();
20 try {
21 foo();
22 } catch (int n) {
23 printf("inner catch: caught %d\n", n);
24 }
25 } catch (int n) {
26 printf("outer catch: caught %d\n", n);
27 }
28 return 0;
29}

Callers

nothing calls this directly

Calls 2

printfFunction · 0.85
fooFunction · 0.70

Tested by

no test coverage detected