| 103 | } |
| 104 | |
| 105 | int main() |
| 106 | { |
| 107 | for( int i=0; i!=10; ++i ) |
| 108 | leaf::try_handle_all( |
| 109 | [&]() -> leaf::result<void> |
| 110 | { |
| 111 | std::cout << "Run # " << i << ": "; |
| 112 | BOOST_LEAF_CHECK(f5()); |
| 113 | std::cout << "Success!" << std::endl; |
| 114 | return { }; |
| 115 | }, |
| 116 | #if ENABLE_ERROR_TRACE // This single #if enables or disables the capturing of the error trace. |
| 117 | []( e_error_trace const & tr ) |
| 118 | { |
| 119 | std::cerr << "Error! Trace:" << std::endl << tr; |
| 120 | }, |
| 121 | #endif |
| 122 | [] |
| 123 | { |
| 124 | std::cerr << "Error!" << std::endl; |
| 125 | } ); |
| 126 | return 0; |
| 127 | } |
| 128 | |
| 129 | //////////////////////////////////////// |
| 130 |
nothing calls this directly
no test coverage detected