MCPcopy Create free account
hub / github.com/PlayFab/gsdk / GenerateReport

Method GenerateReport

cpp/cppsdk/source/playfab/PlayFabError.cpp:37–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 std::string PlayFabError::GenerateReport() const
38 {
39 std::string output;
40 output.reserve(1024);
41 output += ErrorMessage;
42 if (ErrorDetails != Json::Value::null && ErrorDetails.isObject())
43 {
44 for (auto detailIter = ErrorDetails.begin(); detailIter != ErrorDetails.end(); ++detailIter)
45 {
46 if (!detailIter->isArray()) continue;
47
48 output += "\n";
49 output += detailIter.key().asString();
50 output += ": ";
51 int valueIndex = 0;
52 for (auto valueIter = detailIter->begin(); valueIter != detailIter->end(); ++valueIter)
53 {
54 if (!valueIter->isString()) continue;
55 if (valueIndex != 0) output += ", ";
56 output += valueIter->asString();
57 valueIndex++;
58 }
59 }
60 }
61 return output;
62 }
63}

Callers 1

OnPlayFabFailFunction · 0.80

Calls 7

isObjectMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
isArrayMethod · 0.80
asStringMethod · 0.80
keyMethod · 0.80
isStringMethod · 0.80

Tested by

no test coverage detected