MCPcopy Create free account
hub / github.com/cucumber/cucumber-cpp / invoke

Method invoke

src/StepManager.cpp:138–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138InvokeResult BasicStep::invoke(const InvokeArgs* pArgs) {
139 this->pArgs = pArgs;
140 currentArgIndex = 0;
141 currentResult = InvokeResult::success();
142 try {
143 InvokeResult returnedResult = invokeStepBody();
144 if (currentResult.isPending()) {
145 return currentResult;
146 } else {
147 return returnedResult;
148 }
149 } catch (const std::exception& ex) {
150 return InvokeResult::failure(ex.what());
151 } catch (const std::string& ex) {
152 return InvokeResult::failure(ex);
153 } catch (const char* ex) {
154 return InvokeResult::failure(ex);
155 } catch (...) {
156 // Cucumber needs a description here
157 return InvokeResult::failure("Unknown exception");
158 }
159}
160
161void BasicStep::pending() {
162 pending(0);

Callers 6

invokeStepMethod · 0.45
invokeRunsTestsMethod · 0.45
TESTFunction · 0.45
invokeStepMethod · 0.45

Calls 1

isPendingMethod · 0.80

Tested by 4

invokeRunsTestsMethod · 0.36
TESTFunction · 0.36