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

Function main

Examples/NoModules/Chapter 16/Ex16_02/Ex16_02.cpp:7–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

trySomethingFunction · 0.70
whatMethod · 0.45

Tested by

no test coverage detected