MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / main

Function main

Examples/Modules/Chapter 16/Ex16_02/Ex16_02.cpp:8–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6void trySomething(int i);
7
8int main()
9{
10 for (int i {}; i < 2; ++i)
11 {
12 try
13 {
14 trySomething(i);
15 }
16 catch (const Trouble& t)
17 {
18 // What seems to be the trouble?
19 std::cout << "Exception: " << t.what() << std::endl;
20 }
21 }
22}
23
24void trySomething(int i)
25{

Callers

nothing calls this directly

Calls 2

trySomethingFunction · 0.70
whatMethod · 0.45

Tested by

no test coverage detected