MCPcopy Create free account
hub / github.com/apache/thrift / testMultiException

Method testMultiException

test/cpp/src/TestServer.cpp:344–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342 }
343
344 void testMultiException(Xtruct& result,
345 const std::string& arg0,
346 const std::string& arg1) override {
347
348 printf("testMultiException(%s, %s)\n", arg0.c_str(), arg1.c_str());
349
350 if (arg0.compare("Xception") == 0) {
351 Xception e;
352 e.errorCode = 1001;
353 e.message = "This is an Xception";
354 throw e;
355 } else if (arg0.compare("Xception2") == 0) {
356 Xception2 e;
357 e.errorCode = 2002;
358 e.struct_thing.string_thing = "This is an Xception2";
359 throw e;
360 } else {
361 result.string_thing = arg1;
362 return;
363 }
364 }
365
366 void testOneway(const int32_t aNum) override {
367 printf("testOneway(%d): call received\n", aNum);

Callers 2

testMultiExceptionMethod · 0.45
mainFunction · 0.45

Calls 1

compareMethod · 0.45

Tested by

no test coverage detected