MCPcopy Create free account
hub / github.com/boostorg/leaf / main

Function main

example/error_log.cpp:106–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106int main()
107{
108 for( int i=0; i!=10; ++i )
109 leaf::try_handle_all(
110 [&]() -> leaf::result<void>
111 {
112 std::cout << "Run # " << i << ": ";
113 BOOST_LEAF_CHECK(f5());
114 std::cout << "Success!" << std::endl;
115 return { };
116 },
117#if ENABLE_ERROR_LOG // This single #if enables or disables the printing of the error log.
118 []( e_error_log const & )
119 {
120 },
121#endif
122 []
123 {
124 std::cerr << "Error!" << std::endl;
125 } );
126 return 0;
127}
128
129////////////////////////////////////////
130

Callers

nothing calls this directly

Calls 2

try_handle_allFunction · 0.85
f5Function · 0.70

Tested by

no test coverage detected