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

Function handle_some_errors

test/handle_basic_test.cpp:53–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53leaf::result<int> handle_some_errors( int what_to_do )
54{
55 return leaf::try_handle_some(
56 [=]
57 {
58 return compute_answer(what_to_do);
59 },
60 []( error1_tag, leaf::match<error_code, error_code::error1> )
61 {
62 return -1;
63 },
64 []( leaf::match<error_code, error_code::error1> )
65 {
66 return -2;
67 } );
68}
69
70leaf::result<float> handle_some_errors_float( int what_to_do )
71{

Callers 1

mainFunction · 0.85

Calls 2

try_handle_someFunction · 0.85
compute_answerFunction · 0.70

Tested by

no test coverage detected